User:NDKilla/global.js

/* Change language to English */ mw.loader.using("mediawiki.user", function {	if ( mw.user.options.get('language') !== 'en' ) {		mw.loader.load("mediawiki.notify");		( new mw.Api ).postWithToken( 'options', { action: "options", change: "language=en" } ).done( function { mw.loader.using("mediawiki.notify", function{				mw.notify( "Language has been changed to English. Please refresh the page." );			} );		} );	} else {		console.log('Language already set to English!');	} } );

function showBackendPerformance { var respTime = mw.config.get( 'wgBackendResponseTime' ), backend = mw.config.get( 'wgPoweredByHHVM' ) ? 'HHVM' : 'PHP5', server = mw.config.get( 'wgHostname' ), caption = respTime.toString + 'ms ( ' + backend + ' at ' + server + ')'; $( '' ).html( caption ).prependTo( '#p-personal ul' ); }

$( window ).on( 'load', showBackendPerformance );

// Borrowed from User:Void/global.js mw.loader.using(['mediawiki.util','mediawiki.api']).then(function{	mw.loader.load( '//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-popups.js&action=raw&ctype=text/javascript' );	mw.loader.load( 'https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-navpop.css&action=raw&ctype=text/css', 'text/css' );	mw.loader.load( '//ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&action=raw&ctype=text/javascript' ); //	mw.loader.load( '//meta.miraheze.org/w/index.php?title=User:Void/vectorMenus.js&action=raw&ctype=text/javascript' ); //	mw.loader.load( '//en.wikipedia.org/w/index.php?action=raw&ctype=text/css&title=MediaWiki:Gadget-dropdown-menus.css', 'text/css' );	mw.loader.load( '//meta.miraheze.org/w/index.php?action=raw&ctype=text/javascript&title=User:Void/centralAuthLink.js' );	mw.loader.load( '//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Writ_Keeper/Scripts/massRevdel.js' ); mw.loader.load( '//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Writ_Keeper/Scripts/massRollback.js' ); mw.loader.load( '//meta.miraheze.org/w/index.php?title=User:Void/filterLink.js&action=raw&ctype=text/javascript' ); mw.loader.load( '//meta.miraheze.org/w/index.php?title=User:Void/cvtReasons.js&action=raw&ctype=text/javascript' ); mw.loader.load( '//meta.miraheze.org/w/index.php?title=User:Void/quickDel.js&action=raw&ctype=text/javascript' ); if( mw.user.options.get('usenewrc') === 1 ) { $.ajax({			url: mw.util.wikiScript('api'),			type: 'POST',			dataType: 'json',			data: {				format: 'json',				action: 'options',				optionname: 'usenewrc',				optionvalue: 0,				token: mw.user.tokens.get('csrfToken')			}		}); } });

// mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/RTRC.js&action=raw&ctype=text/javascript');