User:SacredOwl/global.js

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:PortableCSSPad/code.js',        'u:dev:MediaWiki:AjaxBatchDelete/code.2.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' });