User:BoxOfNotes/BoxOfTools.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
/*jshint esversion: 6 */

// Tools dropdown
$(`
<nav id="tools-p-cactions" class="vector-menu mw-portlet mw-portlet-cactions vector-menu-dropdown-noicon vector-menu-dropdown" aria-labelledby="p-cactions-label" role="navigation" title="Tools">
  <input type="checkbox" id="tools-p-cactions-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-cactions" class="vector-menu-checkbox" aria-labelledby="p-cactions-label">
  <label id="tools-p-cactions-label" class="vector-menu-heading ">
    <span class="vector-menu-heading-label">Tools</span>
  </label>
  <div class="vector-menu-content">
    <ul class="vector-menu-content-list">
      <li id="tools-ca-subpages" class="mw-list-item">
        <a href="/wiki/Special:PrefixIndex/${mw.config.get("wgPageName")}" title="See this page's subpages">
          <span>Subpages</span>
        </a>
      </li>
      <li id="tools-ca-preferences" class="mw-list-item">
        <a href="/wiki/Special:ToolsPreferences" title="Set preferences for this tab">
          <span>Tools preferences</span>
        </a>
      </li>
</ul></div></nav>
`).insertAfter("#p-cactions");

// Special:ToolsPreferences
// ... no