User:Void/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 */

var user = mw.config.get( 'wgRelevantUserName' ); if( user !== null ){ mw.util.addPortletLink(		'p-tb',		mw.util.getUrl( ( mw.config.get('wgDBname') === 'metawiki' ? '' : 'meta:' ) + 'Special:CentralAuth/' + user ),		'Central Auth',		't-centralauth',		'View global account information'	); }