Jump to content

User:Frozen Wind/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.
/*********
** On all wikis
*********/
//global js, loaded on every wiki, ripped from Hoo man's (thanks!)
/**
 * 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');
 
/**
 * Some JS functions...
 * by [[m:user:Hoo man]] <http://meta.wikimedia.org/wiki/User:Hoo_man/functions.js>
 */
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hoo_man/functions.js&action=raw&ctype=text/javascript');
 
/**
 * Gives some usefull functions for rollback (custom edit summary, mark as bot edits and mass revert)
 * by [[m:user:Hoo man]] <http://meta.wikimedia.org/wiki/User:Hoo_man/smart_rollback.js>
 */
// have no global rollback. /me enlists self for 3 months to get grollback
//mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hoo_man/smart_rollback.js&action=raw&ctype=text/javascript');


/*********
** On specific wikis
*********/
switch(mw.config.get('wgDBname')) {
	/* en.wikibooks.org */
	case 'enwikibooks':
		importScript("User:Frozen Wind/rollback.js");
		break;
	
	/* en.wikipedia.org */
	case 'enwiki':
		importScript('User:Rami_R/rfppClerk.js');
		break;

	/* simple.wikipedia.org */
	case 'simplewiki':
		window.megaversion = "2.5"                                     // megabook.js V2.5 begins
		importScript('User:Microchip08/welcomer.js');                  // turns empty talk pages pink; when clicked preloads welcome template
		importScript('User:Microchip08/uberdiff.js');        // BETA: improve diff pages :)
		importScript('User:Microchip08/cssimport.js');         // adds a gradient to talk pages to make boundaries stand out
		importScript('User:Microchip08/pgarequirements.js');         // adds links to usability & references wizards to toolbox
		importScript('User:Microchip08/stubbifyme.js');     // BETA: Quickly add stubs to articles
		                                                // [[User:Microchip08/megabook.js]] (ends)
		importScript('User:Synergy/rollback.js');
		if (mwCustomEditButtons) {
			mwCustomEditButtons[mwCustomEditButtons.length] = {
				"imageFile": "http://upload.wikimedia.org/wikipedia/commons/6/63/Button_l_en.png", // image from commons, created by Purodha
				"speedTip": "+en iwiki",
				"tagOpen": "[[en:",
				"tagClose": "]]",
				"sampleText": wgPageName
			};
		}
		break;
}