MediaWiki:Gadget-XFDcloser.js

From Seeds of the Word, the encyclopedia of the influence of the Gospel on culture

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.
/*  _____________________________________________________________________________
 * |                                                                             |
 * |                    === WARNING: GLOBAL GADGET FILE ===                      |
 * |                  Changes to this page affect many users.                    |
 * | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. |
 * |_____________________________________________________________________________|
 * 
 * This gadget checks the page, and loads the hidden XFDcloser-core gadget if needed
 */
/* jshint esversion: 5, laxbreak: true, undef: true, eqnull: true, maxerr: 3000 */
/* globals window, $, mw */
/* <nowiki> */
(function(){
	if ( /(?:\?|&)(?:action|diff|oldid)=/.test(window.location.href) ) {
		// Page is in edit, history, diff, or oldid mode
		return;
	}
	var xfdpage_regex = /(Articles_for_deletion\/|Miscellany_for_deletion|User:Cyberbot_I\/AfD's_requiring_attention|Wikipedia:WikiProject_Deletion_sorting\/(?!(Flat|Compact)$)|(Categories|Files|Templates|Redirects)_for_discussion(?!\/(Working|Holding_cell|Speedy)))(?!\/?(?:Administrator_instructions|Common_outcomes)$)/;
	if ( !xfdpage_regex.test(mw.config.get("wgPageName")) ) {
		// Current page is not an XfD page;
		return;
	}
	mw.loader.load("ext.gadget.XFDcloser-core");
})();
/* </nowiki> */