User:SansUT1/global.js

$(function {   if (mw.config.get('skin') !== 'fandomdesktop') return;    var theme = mw.util.getParamValue('usetheme');    if (['light','dark'].indexOf(theme) === -1) return;    $.get(mw.util.wikiScript('wikia')+'?controller=ThemeApi&method=themeVariables&variant='+theme+'&cb='+(new Date.getTime)).done(function(data){ var $s = $('#pcjThemeSwitch')[0] || $(' ').attr('id','pcjThemeSwitch').appendTo('body'); $($s).text(data); $('body').removeClass('theme-fandomdesktop-light theme-fandomdesktop-dark').addClass('theme-fandomdesktop-'+theme); }); }); importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:ThemeToggler.js',    ]});