MediaWiki:Common.js

/* TOGGLE HIGHLIGHT ON ORDERED LISTS WHEN CLICKED */ $(":not(.references li) ol li").click(function (e) {   e.stopPropagation;    if(!($(this).hasClass("highlighted"))) {        $(this).addClass("highlighted");        $(this).find("li").addClass("highlighted");     } else {        $(this).removeClass("highlighted");        $(this).find("li").removeClass("highlighted");     } });

/* HIDE NAMESPACES */ $('title').each(function {   var page_title = this.innerHTML;     if (page_title.includes(":") && !page_title.includes("MediaWiki")) {        var namespace_name = page_title.split(':',2)[0];        var page_name = this.innerHTML = page_title.split(':',2)[1];        page_name = page_name.replace(" - ConsoleMods", "");

$('h1#title').each(function {           this.innerHTML = page_name;        });

$('#firstHeading').each(function {           this.innerHTML = page_name;        });

/* COLOR HEADER TITLE */ if (!page_title.includes("Mods Wiki") && !page_title.includes("ConsoleMods:")) { namespace_name = namespace_name.replace("Console Mods", ""); document.styleSheets[0].addRule('#right-navigation:before','content: "'+namespace_name+' Mods Wiki"!important;'); }

} else { this.innerHTML = "Console Mods Wiki"; document.styleSheets[0].addRule('#right-navigation:before','content: "Console Mods Wiki"!important;'); } });