User:Theopolisme/Scripts/ajaxWatchlist.js: Difference between revisions

Content deleted Content added
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..."
Maintenance: mw:RL/MGU - Removed redundant module
 
(One intermediate revision by one other user not shown)
Line 75:
 
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist' ) {
mw.loader.using( [ 'jquerymediawiki.spinnerutil', 'mediawikijquery.notifyspinner' ], 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 );
} );