FANDOM


// ================================================== // Begin temporary per-page unique CSS // ================================================== // The following script sort of emulates the per-page // unique class functionality that is added to future // version of MediaWiki. //

// This takes

text.Content // and makes it a class in the format: // page-Page_Title_Here // with all spaces and non-alphanumeric characters // converted to underscores. // // So one can style Special:Contributions with a css // command like: body.page-User_Contributions {} // // Query string debugging tools: // &useclass=xxx lets you overwrite the class // &debug=true popup tells you the pageclass function bodyClassAdd() { var bodyclass = document.getElementsByTagName('body')[0].className; var page = pageName(); if(queryString('useclass')) page = queryString('useclass') page = page.replace(/\W/g,'_'); // page = 'page-' + page; if(queryString('debug')) alert('This page has an extra CSS body class:\n' + page+ '\nIt will be applied as soon as you close this alert') document.getElementsByTagName('body')[0].className = bodyclass + ' ' + page; } addOnloadHook(bodyClassAdd); function pageName(){ h1=document.getElementsByTagName('h1'); for (var n=0; n < h1.length ;n++) { if (h1[n].className=="firstHeading") return h1[n].textContent; }; } function queryString(p) { var re = RegExp('[&?]' + p + '=([^&]*)'); var matches; if (matches = re.exec(document.location)) { try { return decodeURI(matches[1]); } catch (e) { } } return null; } // ================================================== // End temporary per-page unique CSS // ==================================================

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.