Jump to content

User:Stryn/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.
var conf = mw.config.get('wgDBname'); if ( ['fiwiki','enwiki','metawiki'].indexOf(conf) == -1) {
	/**
	 * Forces left-to-right layout and editing on RTL wikis.
	 * @see https://meta.wikimedia.org/wiki/Force_ltr
	 * @update-token [[File:pathoschild/forceltr.js]]
	 */
	mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.forceltr.js');

	// Shows the number of active sysops
	// by [[m:user:Hoo man]] <http://meta.wikimedia.org/wiki/User:Hoo_man/active_sysops.js>
	// [[File:Hoo man/active_sysops.js]]
	mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hoo_man/active_sysops.js&action=raw&ctype=text/javascript');

	// 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');

	mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:PiRSquared17/cleandelete.js&action=raw&ctype=text/javascript');

	//<nowiki>
	if(typeof(taggerConfig) == 'undefined') taggerConfig = {};
	taggerConfig.tags = [];
	taggerConfig.editSummary = [];
	taggerConfig.tags[1] = '{{delete|test}}';
	taggerConfig.editSummary[taggerConfig.tags[1]] = 'delete';
	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 useful content}}';
	taggerConfig.editSummary[taggerConfig.tags[4]] = 'delete';
	taggerConfig.tags[5] = '{{delete|blanked by the author}}';
	taggerConfig.editSummary[taggerConfig.tags[5]] = 'delete';
	taggerConfig.tags[6] = '{{delete|wrong language}}';
	taggerConfig.editSummary[taggerConfig.tags[6]] = 'delete';
	taggerConfig.tags[7] = '{{delete|out of project scope}}';
	taggerConfig.editSummary[taggerConfig.tags[7]] = 'delete';
	taggerConfig.tags[8] = '{{speedy}}';
	taggerConfig.editSummary[taggerConfig.tags[8]] = 'delete';
	taggerConfig.tags.other = 'This is used for the option you have to select to be able to insert a custom template';
	//</nowiki>
}

mw.loader.using( ['mediawiki.api.options', 'user.options' ], function () {
	if (mw.user.options.get('visualeditor-hidebetawelcome') === 0) {
		new mw.Api().saveOption('visualeditor-hidebetawelcome', '1');
		mw.user.options.set('visualeditor-hidebetawelcome', '1');
	}
} );

mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Linedwell/centralauthlink.js&action=raw&ctype=text/javascript');

// Provides several useful functions for rollback (custom edit summary, mark as bot edits and mass revert)
// by [[m:user:Hoo man]] <https://meta.wikimedia.org/wiki/User:Hoo_man/Scripts/Smart_rollback>
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hoo_man/smart_rollback.js&action=raw&ctype=text/javascript');

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Guywan/Scripts/ConfirmLogout.js&action=raw&ctype=text/javascript'); // Backlink: [[:en:User:Guywan/Scripts/ConfirmLogout.js]]