MediaWiki

Gadget-Navigation.js

From ACES

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
(function ($, mw) {
  "use strict";
  if (window.NavigationLoaded) return;
  window.NavigationLoaded = true;

  console.log("[Navigation] 0.0.1");
  mw.hook("wikipage.content").add(function () {
    var navigation = $("#top-bar-left #p-navigation");
    var children = navigation.find(
      "ul.dropdown>li:not(.back):not(.parent-link)"
    );
    children.prependTo("#top-bar-left");
    children.addClass("nav-child")
    navigation.addClass("nav-parent")
  });
})(jQuery, mediaWiki);