Преглед на файлове

잘못 고쳐서 다시 고침

잉여개발기 (SPDV) преди 6 години
родител
ревизия
d2ff4bf881
променени са 3 файла, в които са добавени 36 реда и са изтрити 31 реда
  1. 2 1
      route/tool/func.py
  2. 1 1
      version.json
  3. 33 29
      views/main_css/js/shotcuts_set.js

+ 2 - 1
route/tool/func.py

@@ -402,7 +402,8 @@ def other2(data):
         'topic_main_load.js' : '2',
         'topic_plus_load.js' : '2',
         'do_stop_exit.js' : '2',
-        'do_open_folding' : '2'
+        'do_open_folding.js' : '2',
+        'shotcuts_set.js' : '2'
     }
     for i_data in os.listdir(os.path.join("views", "main_css", "js")):
         if i_data in js_filter:

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "master" : {
-        "r_ver" : "v3.1.5-master-02",
+        "r_ver" : "v3.1.5-master-03",
         "c_ver" : "400004",
         "s_ver" : "5"
     }, "stable" : {

+ 33 - 29
views/main_css/js/shotcuts_set.js

@@ -1,33 +1,37 @@
-all_list = [
-    ['F', '/'],
-    ['C', '/recent_changes'],
-    ['D', '/recent_discuss'],
-    ['A', '/random']
-];
+var check = setInterval(function() {
+    try {
+        all_list = [
+            ['F', '/'],
+            ['C', '/recent_changes'],
+            ['D', '/recent_discuss'],
+            ['A', '/random']
+        ];
 
-all_list.forEach(function(element) {
-    shortcut.add(element[0], function() {
-        window.location.href = element[1];
-    }, {
-        'disable_in_input' : true
-    }); 
-});
+        all_list.forEach(function(element) {
+            shortcut.add(element[0], function() {
+                window.location.href = element[1];
+            }, {
+                'disable_in_input' : true
+            }); 
+        });
 
-all_list_2 = [
-    ['W', '/w'],
-    ['H', '/history'],
-    ['E', '/edit'],
-];
+        all_list_2 = [
+            ['W', '/w'],
+            ['H', '/history'],
+            ['E', '/edit'],
+        ];
 
-window.onload = function () { 
-    all_list_2.forEach(function(element) {    
-        shortcut.add(element[0], function() {
-            href_d = window.location.href.split("/");
-            if(href_d[4]) { 
-                window.location.href = element[1] + '/' + href_d[4];
-            }
-        }, {
-            'disable_in_input' : true
+        all_list_2.forEach(function(element) {    
+            shortcut.add(element[0], function() {
+                href_d = window.location.href.split("/");
+                if(href_d[4]) { 
+                    window.location.href = element[1] + '/' + href_d[4];
+                }
+            }, {
+                'disable_in_input' : true
+            });
         });
-    });
-}
+
+        clearInterval(check);
+    } catch { }
+});