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