User:Wikitanvir/steward.js

From Meta, a Wikimedia project coordination wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
// Scripts here are stewards only

// Hide account deletion section on Special:CentralAuth, will be visible again using a link
// By [[m:user:Hoo man]]
function hideDeleteAccount() {
	if(mw.config.get('wgCanonicalNamespace') != 'Special' || mw.config.get('wgCanonicalSpecialPageName') != 'CentralAuth' || !document.getElementById('mw-centralauth-delete')) {
		return false;
	}
	document.getElementById('mw-centralauth-delete').style.display = 'none';
	tmp = '<a href="#" onClick="document.getElementById(\'mw-centralauth-delete\').style.display = \'\'; this.style.display = \'none\';">Show</a>';
	document.getElementById('mw-centralauth-delete').parentNode.innerHTML += tmp;
}
$(hideDeleteAccount);

/**
 * StewardScript extends the user interface for Wikimedia stewards' convenience.
 * @see https://meta.wikimedia.org/wiki/StewardScript
 * @update-token [[File:pathoschild/stewardscript.js]]
 */
//mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.stewardscript.js');