From: Fomafix Date: Tue, 16 Aug 2016 07:07:29 +0000 (+0000) Subject: watch.js: Preload module 'mediawiki.notification' after exit paths X-Git-Tag: 1.31.0-rc.0~6049^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=ae95cdbcef9343809c3d13106f6d43073f346f05;p=lhc%2Fweb%2Fwiklou.git watch.js: Preload module 'mediawiki.notification' after exit paths mw.notify is not called on the exit paths. A preload is not necessary. Change-Id: I2b14a269afd78649eda86a40b33e22412e645e31 --- diff --git a/resources/src/mediawiki/page/watch.js b/resources/src/mediawiki/page/watch.js index c59f5ba97a..b860dbdbb8 100644 --- a/resources/src/mediawiki/page/watch.js +++ b/resources/src/mediawiki/page/watch.js @@ -108,9 +108,6 @@ $links.click( function ( e ) { var action, api, $link; - // Preload the notification module for mw.notify - mw.loader.load( 'mediawiki.notification' ); - action = mwUriGetAction( this.href ); if ( action !== 'watch' && action !== 'unwatch' ) { @@ -128,6 +125,9 @@ updateWatchLink( $link, action, 'loading' ); + // Preload the notification module for mw.notify + mw.loader.load( 'mediawiki.notification' ); + api = new mw.Api(); api[ action ]( title )