FANDOM


//
/* Blackout v1.3
 * Justin Stallings (User:Dzylon), 2012
 */
 
if (mw.config.get('wgCanonicalNamespace') === "Special") {
    $(function () {
        var blackoutCounter = 0;
        function blackout() {
            if (blackoutCounter === 0) {
                var blackoutStyle = document.createElement("link");
                blackoutStyle.type = 'text/css';
                blackoutStyle.rel = 'stylesheet';
                blackoutStyle.id = 'blackoutStyle';
                if (mw.config.get('wgPageName') === 'Special:Chat') {
                    blackoutStyle.href = 'http://dzy.wikia.com/index.php?title=Blackout/chat.css&action=raw&ctype=text/css';
                } else {
                    blackoutStyle.href = 'http://dzy.wikia.com/index.php?title=Blackout/special.css&action=raw&ctype=text/css';
                }
                document.head.appendChild(blackoutStyle);
                blackoutCounter++;
            } else {
                var blackoutStyle = document.getElementById("blackoutStyle");
                blackoutStyle.parentNode.removeChild(blackoutStyle); 
                blackoutCounter--;
            }
        }
 
        if (mw.config.get('wgPageName') === 'Special:Chat') {
            $('.public.wordmark>a').after("<button id='blackout'>Blackout</button>");
        } else if ($("#ajaxRefresh").length > 0) {
            $('.WikiaLogo').after("<button id='blackout' style='margin-right:6px'>Blackout</button>");
        }
        $('#blackout').on("click", blackout);
    });
}
 
//

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.