MediaWiki:Common.js

From XMethod Wiki
Revision as of 04:51, 2 February 2026 by Maintenance script (talk | contribs)
Jump to navigation Jump to search

Note: After publishing, 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.
/* Make Admin Tools sidebar header clickable - links to Newsletter Dashboard */
$(function() {
    // Find the Admin Tools section header
    var sections = document.querySelectorAll(".vector-menu-heading-label");
    sections.forEach(function(header) {
        if (header.textContent.trim() === "Admin Tools") {
            var link = document.createElement("a");
            link.href = "/Special:NewsletterDashboard";
            link.style.color = "inherit";
            link.style.textDecoration = "none";
            link.style.cursor = "pointer";
            link.textContent = header.textContent;
            header.textContent = "";
            header.appendChild(link);
        }
    });
});