User:01miki10/global.js

window.nullEditDelay = 1500; mw.loader.load( 'https://dev.fandom.com/load.php?mode=articles&articles=MediaWiki:WhatLinksHere/code.js|MediaWiki:MassNullEdit/code.js|MediaWiki:NullEditButton/code.js|MediaWiki:NoImageLightbox/code.js|MediaWiki:ThemeSwitcher.js&only=scripts' );

/* change interface to content language */ mw.loader.using( ['mediawiki.api', 'user.options'], function {	var lang = mw.config.get( 'wgContentLanguage' );	if ( lang !== mw.user.options.get( 'language' ) ) {		var api = new mw.Api;		api.saveOption( 'language', lang ).then( console.log( 'Interface language set to ' + lang ) );	} } );

/** * For action=purge to index.php *  change it to POST api.php *  then reload the page * Restores pre-1.28 behavior to MW 1.28+ * Based on meta:User:Glaisher/autoPurge.js, 21 Aug 2016 */ if (( mw.config.get( 'wgAction' ) === 'purge' ) &&	( $.inArray( 'user', mw.config.get( 'wgUserGroups' )) + 1 )) { $.post( mw.config.get( 'wgScriptPath' ) + '/api.php', {		format: 'none',		action: 'purge',		titles: mw.config.get( 'wgPageName' ).replace( /_/g, ' ' )	}, function {		// remove action=purge, but keep the rest		location.replace( location.pathname + location.search .replace( /(?:\?|&)action=purge$/i, '' ) .replace( /(\?|&)action=purge&/i, '$1' ) + location.hash );	} ); }