User:The Voidwalker/centralAuthLink.js

/* * Creates a link to the Central Auth of any user in the tools part of the sidebar from anywhere in their userspace or from their contributions page. * Import using: importScript('User:The Voidwalker/centralAuthLink.js'); * in your common.js */ mw.loader.using(['mediawiki.util']).done(function{	var user = mw.config.get( 'wgRelevantUserName' );	if( user !== null && !mw.util.isIPAddress(user) ){		mw.util.addPortletLink( 'p-tb', mw.util.getUrl('m:Special:CentralAuth/' + user), 'Central Auth', 't-centralauth', 'View global account information' );	} });