Content deleted Content added
Theopolisme (talk | contribs) Backported from https://meta.wikimedia.org/w/index.php?title=User:He7d3r/Tools/ajaxWatchlist.js&oldid=12538372 "Do not reload the watchlist while there is user interaction; Use .done/.fail instead of the deprecated jQuery callbacks; Do not..." |
MusikAnimal (talk | contribs) declare dependencies |
||
Line 75:
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist' ) {
mw.loader.using( [ 'mediawiki.util', 'jquery.spinner', 'mediawiki.notify' ], function () {▼
// Add custom css for the loading indicator
mw.util.addCSS( '.watchlistLoadingIndicator { float: right; font-size: 12px; } ' );
// Run updateWatchlist() every 20 seconds by default (can be configured via window.watchlistUpdateFrequency)
▲ mw.loader.using( [ 'jquery.spinner', 'mediawiki.notify' ], function () {
interval = setInterval( updateWatchlist, window.watchlistUpdateFrequency || 20000 );
} );
|