User:NeoGirl/global.js

importArticles({   type: 'script',    articles: [         'u:dev:MediaWiki:AjaxBatchDelete.js',         'u:dev:MediaWiki:MassCategorization/code.js',            ] }); mw.hook('dev.wds').add(function(wds) {   $('.page-side-tools').append(' ');    $('.skin-theme-toggle').append( wds.icon('eye-small') );

var api = new mw.Api; $('.skin-theme-toggle').click( function {       var theme = mw.user.options.values.theme;        var newTheme = theme === 'light' ? 'dark' : 'light';        api.postWithToken( 'csrf', { action: 'options', optionname: 'theme', optionvalue: newTheme } ).done( function  { location.reload } )   } ) });

importArticle({ type: 'script', article: 'u:dev:MediaWiki:WDSIcons/code.js' });