User:MAGE-KIL-R/wikia.js

$(function {     function getStyleSheet {        if($('link[rel=stylesheet][href*="darkmode.css"]').length === 0) {            importArticle({type: "style", article: "User:CephHunter/darkmode.css"});        }    }    var darkModeCookie = 'dark-mode-status';    if ($.cookie(darkModeCookie) === null) {        $.cookie(darkModeCookie, false, {expires:7, path:'/'});    }    var darkModeStatus = $.cookie(darkModeCookie) === "true";    function darkmode(status) {        if (status) {            $("#darkModeButton #greenBackground").animate({width: "100%"}, 200);            $.cookie(darkModeCookie, true, {expires:7, path:'/'});            getStyleSheet;            $('link[rel=stylesheet][href*="darkmode.css"]').prop('disabled', false);        } else {            $("#darkModeButton #greenBackground").animate({width: "57.5%"}, 200);            $.cookie(darkModeCookie, false, {expires:7, path:'/'}); $('link[rel=stylesheet][href*="darkmode.css"]').prop('disabled', true); }   }