MediaWiki:Gadget-WatchlistNotice.js
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.
/**
* WatchlistNotice
* This is just a loader-gadget:
* Only works at [[Special:Watchlist]]
*
* @rev 1 (2013-05-23)
* @author Rillke, 2013
*/
// List the global variables for jsHint-Validation. Please make sure that it passes http://jshint.com/
// Scheme: globalVariable:allowOverwriting[, globalVariable:allowOverwriting][, globalVariable:allowOverwriting]
/*global jQuery:false, mediaWiki:false*/
// Load the heavy code only on pages where it is really required; Userlogin only loads site-JS after logging-in not at the login-form itself
if ($.inArray(mw.config.get('wgCanonicalSpecialPageName'), ['Watchlist', 'Userlogin']) > -1 ||
/^Commons:Community_portal/.test(mw.config.get('wgPageName'))) {
mw.loader.load('ext.gadget.WatchlistNotice.core');
}