Jump to content

User:Krenair/global.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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// Add the backend response time to the personal bar.
$( document ).ready( function () {
	var backendResp = mw.config.get( 'wgBackendResponseTime' ),
	    hostname = mw.config.get( 'wgHostname' );
	console.log( backendResp, hostname );
	$( '<li>' ).html( backendResp.toString() + 'ms (' + hostname + ')' ).prependTo( '#p-personal ul:first' );
} );

/*
if ( mw.config.get( 'wgDBname' ) !== 'wikidatawiki' ) {
	// This tool can tag pages with a few clicks (which is much faster than editing the whole page per Hand).
	// by [[m:user:Hoo man]] <http://meta.wikimedia.org/wiki/User:Hoo_man/Scripts/Tagger>
	mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hoo_man/tagger.js&action=raw&ctype=text/javascript');
	//<nowiki>
	if ( window.taggerConfig === undefined ) {
		window.taggerConfig = {};
	}
	taggerConfig.tags = [];
	taggerConfig.editSummary = [];
	taggerConfig.tags[1] = '{{delete|Vandalism/long-term abuse}}';
	taggerConfig.editSummary[taggerConfig.tags[1]]='LTA';
	taggerConfig.tags[2] = '{{delete|Spam}}';
	taggerConfig.editSummary[taggerConfig.tags[2]]= 'delete';
	taggerConfig.tags[3] = '{{delete|Vandalism}}';
	taggerConfig.editSummary[taggerConfig.tags[3]] = 'delete';
	taggerConfig.tags[4] = '{{delete|No meaning}}'
	taggerConfig.editSummary[taggerConfig.tags[4]]= 'delete';
	taggerConfig.tags[5] = '{{delete|Vandalisme}}';
	taggerConfig.editSummary[taggerConfig.tags[5]]= 'supprimer';
	taggerConfig.tags[6] = '{{delete}}';
	taggerConfig.editSummary[taggerConfig.tags[6]]= 'delete';
	taggerConfig.tags.other='Custom';
	taggerConfig.noDeleteOnly = true;
	//</nowiki>
}
*/