zahmis 5 лет назад
Родитель
Сommit
e08b971c95
1 измененных файлов с 3 добавлено и 9 удалено
  1. 3 9
      src/client/js/legacy/crowi.js

+ 3 - 9
src/client/js/legacy/crowi.js

@@ -217,8 +217,8 @@ window.addEventListener('load', (e) => {
   if (window.location.hash) {
   if (window.location.hash) {
     const navigationContainer = appContainer.getContainer('NavigationContainer');
     const navigationContainer = appContainer.getContainer('NavigationContainer');
 
 
-    if ((window.location.hash === '#edit' || window.location.hash === '#edit-form') && $('.tab-pane#edit').length > 0) {
-      navigationContainer.setEditorMode('builtin');
+    if ((window.location.hash === '#edit' || window.location.hash === '#edit-form')) {
+      navigationContainer.setEditorMode('edit');
 
 
       $('a[data-toggle="tab"][href="#edit"]').tab('show');
       $('a[data-toggle="tab"][href="#edit"]').tab('show');
       $('body').addClass('on-edit');
       $('body').addClass('on-edit');
@@ -227,16 +227,13 @@ window.addEventListener('load', (e) => {
       // focus
       // focus
       Crowi.setCaretLineAndFocusToEditor();
       Crowi.setCaretLineAndFocusToEditor();
     }
     }
-    else if (window.location.hash === '#hackmd' && $('.tab-pane#hackmd').length > 0) {
+    else if (window.location.hash === '#hackmd') {
       navigationContainer.setEditorMode('hackmd');
       navigationContainer.setEditorMode('hackmd');
 
 
       $('a[data-toggle="tab"][href="#hackmd"]').tab('show');
       $('a[data-toggle="tab"][href="#hackmd"]').tab('show');
       $('body').addClass('on-edit');
       $('body').addClass('on-edit');
       $('body').addClass('hackmd');
       $('body').addClass('hackmd');
     }
     }
-    else if (window.location.hash === '#revision-history' && $('.tab-pane#revision-history').length > 0) {
-      $('a[data-toggle="tab"][href="#revision-history"]').tab('show');
-    }
   }
   }
 });
 });
 
 
@@ -296,9 +293,6 @@ window.addEventListener('hashchange', (e) => {
     else if (window.location.hash === '#hackmd') {
     else if (window.location.hash === '#hackmd') {
       $('a[data-toggle="tab"][href="#hackmd"]').tab('show');
       $('a[data-toggle="tab"][href="#hackmd"]').tab('show');
     }
     }
-    else if (window.location.hash === '#revision-history') {
-      $('a[data-toggle="tab"][href="#revision-history"]').tab('show');
-    }
   }
   }
   else {
   else {
     $('a[data-toggle="tab"][href="#revision-body"]').tab('show');
     $('a[data-toggle="tab"][href="#revision-body"]').tab('show');