User:Joritochip/global.js

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:DupImageList/code.js',        'u:dev:MediaWiki:AjaxDelete/code.js',        'u:dev:MediaWiki:AjaxRC.js',        'u:dev:MediaWiki:SmoothGlobalNav/code.js',        'u:dev:MediaWiki:UTCClock/code.js',        'u:dev:MediaWiki:Wikimarks/code.js',        'u:dev:MediaWiki:MassCategorization/code.js',        'u:dev:MediaWiki:WHAM/code.2.js',    ] });

$(function {   if (mw.config.get('skin') !== 'fandomdesktop') return;    var theme = $("body").hasClass("theme-fandomdesktop-light") ? "light" : "dark";	function switchTheme {		theme = theme === "light" ? "dark" : "light";		$.get(mw.util.wikiScript('wikia')+'?controller=ThemeApi&method=brandThemeVariables&variant='+theme).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); });	}   $(".tools").append($(' Toggle theme').click(switchTheme)); });