MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* Make Admin Tools sidebar header clickable */ | /* Make Admin Tools sidebar header clickable - links to Newsletter Dashboard */ | ||
$(function() { | $(function() { | ||
var | // Find the Admin Tools section header | ||
if ( | 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); | |||
} | |||
}); | |||
}); | }); | ||
Revision as of 04:51, 2 February 2026
/* 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);
}
});
});