MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 16: | Line 16: | ||
}); | }); | ||
/* Load SocialFeed on the Social page - | /* Load SocialFeed on the Social page - v11 */ | ||
if (mw.config.get("wgPageName").indexOf("User:Docmoates/Social") !== -1) { | if (mw.config.get("wgPageName").indexOf("User:Docmoates/Social") !== -1) { | ||
mw.loader.load("/index.php?title=MediaWiki:Gadget-SocialFeed.css&action=raw&ctype=text/css&v= | mw.loader.load("/index.php?title=MediaWiki:Gadget-SocialFeed.css&action=raw&ctype=text/css&v=11", "text/css"); | ||
mw.loader.load("/index.php?title=MediaWiki:Gadget-SocialFeed.js&action=raw&ctype=text/javascript&v= | mw.loader.load("/index.php?title=MediaWiki:Gadget-SocialFeed.js&action=raw&ctype=text/javascript&v=11"); | ||
} | } | ||
Revision as of 15:30, 4 February 2026
/* Make Admin Tools sidebar header clickable - links to Newsletter Dashboard */
$(function() {
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);
}
});
});
/* Load SocialFeed on the Social page - v11 */
if (mw.config.get("wgPageName").indexOf("User:Docmoates/Social") !== -1) {
mw.loader.load("/index.php?title=MediaWiki:Gadget-SocialFeed.css&action=raw&ctype=text/css&v=11", "text/css");
mw.loader.load("/index.php?title=MediaWiki:Gadget-SocialFeed.js&action=raw&ctype=text/javascript&v=11");
}