User:Oshwah/GlobalRenameHelper.js

// Worked on by NeoBogan (User:Dax Bane), Tks4Fish, Operator873, Enterprisey, and Vermont // This script adds Emergency, SRG, CentralAuth, and GUC links to the sidebar. // To add to your own .js page, use: mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Vermont/sidebar.js&action=raw&ctype=text/javascript');

(function {	$(document).ready(function { mw.loader.using( ['mediawiki.util'], function {			// show shortcuts if not editing			if (!mw.config.get('wgEditMessage')) {				var navLink = null;				mw.util.addPortletLink("p-navigation", "https://meta.wikimedia.org/wiki/Special:EmailUser/Emergency", "Emergency");				mw.util.addPortletLink("p-navigation", "https://meta.wikimedia.org/wiki/Steward_requests/Global", "SRG");

navLink = mw.util.addPortletLink("p-navigation", "#", "CentralAuth"); navLink.addEventListener("click", goCentralMeta);

navLink = mw.util.addPortletLink("p-navigation", "#", "GUC"); navLink.addEventListener("click", goGUC); return; }		});	}); });

function goCentralMeta { var szUser = prompt ("Username?"); switch (szUser) { case null: case undefined: case '': //Do nothing break; default: if (mw.config.get('wgNoticeProject') != 'meta') { window.open('/wiki/meta:Special:CentralAuth/' + szUser, '_blank'); } else { window.open('/wiki/Special:CentralAuth/' + szUser, '_blank'); }	} }

function goGUC { var szUser = prompt ("User?"); switch (szUser) { case null: case undefined: case '': //Do nothing break; default: {			window.open('https://tools.wmflabs.org/guc/?user=' + szUser, '_blank'); }	} }