2du 4 anni fa
parent
commit
3060573728
3 ha cambiato i file con 22 aggiunte e 20 eliminazioni
  1. 1 1
      version.json
  2. 15 16
      views/main_css/js/load_shortcut.js
  3. 6 3
      views/main_css/js/render_onmark.js

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "beta" : {
-        "r_ver" : "v3.4.0-beta (stable2) (beta4) (dev16)",
+        "r_ver" : "v3.4.0-beta (stable2) (beta5) (dev20)",
         "c_ver" : "3400101",
         "s_ver" : "12"
     }

+ 15 - 16
views/main_css/js/load_shortcut.js

@@ -4,15 +4,14 @@ document.onkeyup = function(e) {
 }
 
 document.onkeypress = function(e) {
-    let doc_shortcut = /^\/(w|history)\//i;
-    
-    shortcut_key_list[e.key] = 1;
+    let shortcut_check = event.target.tagName.toLowerCase();
     if(
-        window.location.pathname.match(doc_shortcut) ||
-        window.location.pathname === '/recent_change' ||
-        window.location.pathname === '/recent_changes' ||
-        window.location.pathname === '/recent_discuss'
+        shortcut_check !== 'input' &&
+        shortcut_check !== 'textarea'
     ) {
+        let doc_shortcut = /^\/(w|history|edit|acl|topic|xref)\//i;
+
+        shortcut_key_list[e.key] = 1;
         if(shortcut_key_list['f'] === 1) {
             window.location.href = '/';
         } else if(shortcut_key_list['c'] === 1) {
@@ -22,15 +21,15 @@ document.onkeypress = function(e) {
         } else if(shortcut_key_list['a'] === 1) {
             window.location.href = '/random';
         }
-    }
-    
-    if(window.location.pathname.match(doc_shortcut)) {
-        if(shortcut_key_list['w'] === 1) {
-            window.location.pathname = window.location.pathname.replace(doc_shortcut, '/w/');
-        } else if(shortcut_key_list['e'] === 1) {
-            window.location.pathname = window.location.pathname.replace(doc_shortcut, '/edit/');
-        } else if(shortcut_key_list['h'] === 1) {
-            window.location.pathname = window.location.pathname.replace(doc_shortcut, '/history/');
+
+        if(window.location.pathname.match(doc_shortcut)) {
+            if(shortcut_key_list['w'] === 1) {
+                window.location.pathname = window.location.pathname.replace(doc_shortcut, '/w/');
+            } else if(shortcut_key_list['e'] === 1) {
+                window.location.pathname = window.location.pathname.replace(doc_shortcut, '/edit/');
+            } else if(shortcut_key_list['h'] === 1) {
+                window.location.pathname = window.location.pathname.replace(doc_shortcut, '/history/');
+            }
         }
     }
 }

+ 6 - 3
views/main_css/js/render_onmark.js

@@ -244,7 +244,9 @@ function do_onmark_link_render(data, data_js, name_doc, name_include, data_nowik
 
             num_link += 1;
             var num_link_str = String(num_link - 1);
-            if(link_real.match(file_re)) {
+            if(link_real.match(/<|>/)) {
+                return '<link_s>' + x_1 + '<link_e>';
+            } else if(link_real.match(file_re)) {
                 var file_load_type = link_real.match(file_re)[1];
                 var file_name = link_real.replace(file_re, '');
 
@@ -446,6 +448,9 @@ function do_onmark_link_render(data, data_js, name_doc, name_include, data_nowik
             }
         });
     }
+    
+    data = data.replace(/<link_s>/, '[[');
+    data = data.replace(/<link_e>/, ']]');
 
     if(category_data !== '') {
         if(name_include === '') {
@@ -763,8 +768,6 @@ function do_onmark_last_render(data) {
     data = data.replace(/<wiki_s_[0-9] /g, '<div ');
     data = data.replace(/<wiki_e_[0-9]>/g, '</div>');
     
-    console.log(data);
-    
     // heading_render 마지막 처리
     data = data.replace(/\n?<start_point>/g, '');
     data = data.replace(/<end_point>\n?/g, '');