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 {   if (this.innerHTML.includes(":")) { console.log("initial string: " + this.innerHTML);        var namespace_name = this.innerHTML.split(':',2)[0];        var page_name = this.innerHTML.split(':',2)[1].replace(" - ConsoleMods", "");        this.innerHTML = page_name; console.log("page_name: " + page_name)

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

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

/* COLOR HEADER TITLE */ console.log("namespace_name: " + namespace_name) namespace_name = namespace_name.replace("Console Mods", ""); document.styleSheets[0].addRule('#mw-head:after','content: "'+namespace_name+' Mods Wiki"!important;');

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