User:Revi/global.js

/** If some methods in this page is deprecated and needs to be changed, feel free to do so.

If you're asked by me for help, feel free to edit.

Otherwise, come to my talk page and ask for an edit.

// Display users rights (Temporary, might work on my own rewrite of this or find another one) mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Splarka/sysopdectector.js&action=raw&ctype=text/javascript');

// No MediaViewer mw.config.set("wgMediaViewerOnClick", false);

// No VisualEditor, for OPT-OUT wikis. mw.hook('BeforePageDisplay').remove('ext.visualEditor.viewPageTarget.init'); mw.user.options.set('visualeditor-enable',0);

/** * Ajax sysop * @see https://meta.wikimedia.org/wiki/Ajax_sysop * @update-token */ mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxsysop.js');

/* Mark blocked user as such. */ mw.loader.load('//ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&action=raw&ctype=text/javascript');

/* Change language to Korean if it is not */ mw.loader.using("mediawiki.user", function {	if ( mw.user.options.get('language') !== 'ko' ) {		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 Korean. Please refresh the page." );			} );		} );	} else {		console.log('Language already set to Korean!');	} } );