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: mw.loader.load('//meta.miraheze.org/w/index.php?title=User:Void/centralAuthLink.js&action=raw&ctype=text/javascript'); * in your common.js */

var user = mw.config.get( 'wgRelevantUserName' ); if( user !== null && !mw.util.isIPAddress(user) ){ 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'	); }