whistle 2.9.95 → 2.9.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/assets/menu.html CHANGED
@@ -206,6 +206,7 @@
206
206
  whistleBridge.showCustomCerts = options.showCustomCerts;
207
207
  whistleBridge.request = options.request;
208
208
  whistleBridge.createRequest = options.createRequest;
209
+ whistleBridge.parseRules = options.parseRules;
209
210
  whistleBridge.showModal = options.showModal;
210
211
  whistleBridge.createModal = options.createModal;
211
212
  whistleBridge.importRules = options.importRules;
package/assets/modal.html CHANGED
@@ -29,6 +29,7 @@
29
29
  whistleBridge.showCustomCerts = options.showCustomCerts;
30
30
  whistleBridge.request = options.request;
31
31
  whistleBridge.createRequest = options.createRequest;
32
+ whistleBridge.parseRules = options.parseRules;
32
33
  whistleBridge.showModal = options.showModal;
33
34
  whistleBridge.importRules = options.importRules;
34
35
  whistleBridge.importValues = options.importValues;
package/assets/tab.html CHANGED
@@ -299,6 +299,7 @@
299
299
  whistleBridge.showCustomCerts = options.showCustomCerts;
300
300
  whistleBridge.request = options.request;
301
301
  whistleBridge.createRequest = options.createRequest;
302
+ whistleBridge.parseRules = options.parseRules;
302
303
  whistleBridge.showModal = options.showModal;
303
304
  whistleBridge.getSelectedSessionList = getSelectedSessionList;
304
305
  whistleBridge.getActiveSession = whistleBridge.getSession = whistleBridge.getSelectedSession = getActiveSession;
@@ -2,11 +2,25 @@ var get = require('./index');
2
2
 
3
3
  module.exports = function(req, res) {
4
4
  var rules = get();
5
- var data = {
6
- Default: rules.defaultRules
7
- };
8
- rules.list.forEach(function(item) {
9
- data[item.name] = item.data;
10
- });
5
+ var data;
6
+ if (req.query.order) {
7
+ data = [{
8
+ name: 'Default',
9
+ value: rules.defaultRules
10
+ }];
11
+ rules.list.forEach(function(item) {
12
+ data.push({
13
+ name: item.name,
14
+ value: item.data
15
+ });
16
+ });
17
+ } else {
18
+ data = {
19
+ Default: rules.defaultRules
20
+ };
21
+ rules.list.forEach(function(item) {
22
+ data[item.name] = item.data;
23
+ });
24
+ }
11
25
  res.json(data);
12
26
  };
@@ -1,9 +1,20 @@
1
1
  var get = require('./index');
2
2
 
3
3
  module.exports = function(req, res) {
4
- var data = {};
5
- get().list.forEach(function(item) {
6
- data[item.name] = item.data;
7
- });
4
+ var data;
5
+ if (req.query.order) {
6
+ data = [];
7
+ get().list.forEach(function(item) {
8
+ data.push({
9
+ name: item.name,
10
+ value: item.data
11
+ });
12
+ });
13
+ } else {
14
+ data = {};
15
+ get().list.forEach(function(item) {
16
+ data[item.name] = item.data;
17
+ });
18
+ }
8
19
  res.json(data);
9
20
  };
@@ -8,6 +8,6 @@
8
8
  </head>
9
9
  <body style="overscroll-behavior-x: none;">
10
10
  <div id="container" class="main"></div>
11
- <script src="js/index.js?v=2.9.95"></script>
11
+ <script src="js/index.js?v=2.9.96"></script>
12
12
  </body>
13
13
  </html>