Explorar el Código

delete unuse jquery

zahmis hace 5 años
padre
commit
9a793b471f
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5 2
      src/client/js/legacy/crowi.js

+ 5 - 2
src/client/js/legacy/crowi.js

@@ -276,14 +276,17 @@ window.addEventListener('hashchange', (e) => {
   Crowi.unhighlightSelectedSection(Crowi.findHashFromUrl(e.oldURL));
   Crowi.highlightSelectedSection(Crowi.findHashFromUrl(e.newURL));
   Crowi.modifyScrollTop();
+  const { appContainer } = window;
+  const navigationContainer = appContainer.getContainer('NavigationContainer');
+
 
   // hash on page
   if (window.location.hash) {
     if (window.location.hash === '#edit') {
-      $('a[href="#edit"]').tab('show');
+      navigationContainer.setEditorMode('edit');
     }
     else if (window.location.hash === '#hackmd') {
-      $('a[href="#hackmd"]').tab('show');
+      navigationContainer.setEditorMode('hackmd');
     }
   }
   else {