User:Bitomic/global.js

window.NoImageLightbox = { novideo: true }; window.FCButtons = [ {		label: 'Create user page', target: 'User:Bitomic', content: '\n', alwaysDisplay: true, placement: '.wds-global-navigation__user-menu .wds-list' } ];

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 } )	} ) });

importArticles({	type: 'script',	articles: [		'u:dev:MediaWiki:FastCreate.js',		'u:dev:MediaWiki:NoImageLightbox/code.js',		'u:dev:MediaWiki:WDSIcons/code.js',		'u:dev:MediaWiki:WhatLinksHere/code.js',		'u:dev:MediaWiki:WHAM/code.2.js'	] }); $('#PageHeader').append(' ' + mw.config.values.wgCurRevisionId + ' ');