User:Chrs/global.js

var global_signature = "— Arcversin (talk) "

$( document ).ready( function {	if(mw.config.get('wgRelevantUserName') != null) {		mw.util.addPortletLink( 'p-tb', 'https://meta.miraheze.org/wiki/Special:RequestWikiQueue?status=*&requester=' + mw.config.get('wgRelevantUserName'), 'Wiki requests', 't-wikireq', 'List wiki requests by user', '',			'#t-upload' );	}	mw.util.addPortletLink( 'p-tb', location.href.replace( location.hash, '' ) + ( location.search ? '&' : '?' ) + 'uselang=qqx', 'Interface debug', 't-ifdebug', 'Reload the current page with message id\'s displayed instead of text' );	$('.mw-usertoollinks .mw-usertoollinks-contribs').each(function{ $(this).after(' | global') })	if(mw.config.get('wgCanonicalSpecialPageName') == 'Contributions'){		$('.mw-contributions-user-tools .mw-changeslist-links').append(' global ')	} });

mw.hook('moremenu.ready').add(function {	if (!mw.config.get( 'wgIsArticle' )) return;	$('#mm-page-purge-cache').on( 'click', function (e) { new mw.Api.post( { action: 'purge', titles: mw.config.get( 'wgPageName' ) } ).then(function {			location.reload;		}, function  {			mw.notify( 'Purge failed', { type: 'error' } );		}); e.preventDefault; });	$('#mm-page-purge-cache-link').on( 'click', function (e) { new mw.Api.post( { action: 'purge', forcelinkupdate: true, forcerecursivelinkupdate: true, titles: mw.config.get( 'wgPageName' ) } ).then(function {			location.reload;		}, function  {			mw.notify( 'Purge failed', { type: 'error' } );		}); e.preventDefault; }); });

mw.loader.load('https://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-markblocked.js'); mw.loader.load('https://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Gary/comments_in_local_time.js'); mw.loader.load('https://commons.wikimedia.org/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-HotCat.js'); mw.loader.load('https://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:BrandonXLF/Restorer.js');

mw.loader.using(['mediawiki.user', 'mediawiki.util', 'mediawiki.api'], function {    mw.loader.load('https://meta.miraheze.org/w/index.php?action=raw&ctype=text/javascript&title=User:Arcversin/MoreMenu.js');    if(mw.user.options.values['nickname'] != global_signature){		new mw.Api.postWithToken('csrf', { action: 'options', change: 'fancysig=1', optionname: 'nickname', optionvalue: global_signature });	} });