Browse Source

추가 단축키

Surplus_Up (2DU) 7 years ago
parent
commit
4880a91180
1 changed files with 17 additions and 0 deletions
  1. 17 0
      views/main_css/js/shotcuts_set.js

+ 17 - 0
views/main_css/js/shotcuts_set.js

@@ -11,4 +11,21 @@ all_list.forEach(function(element) {
     }, {
         'disable_in_input' : true
     }); 
+});
+
+all_list_2 = [
+    ['W', '/w'],
+    ['H', '/history'],
+    ['E', '/edit'],
+];
+
+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
+    });
 });