X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki%2Fpage%2Fwatch.js;h=6322ccd29df7f1949ff0cdf6cd21fbef6dc8b525;hb=54064372aaa43c0518e4130738a39ffdf06cca23;hp=7d35cb759c4457e2441bd302203750a16daf741b;hpb=6ad363a177c2fb8ca77e889f7328ef0d90650422;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki/page/watch.js b/resources/src/mediawiki/page/watch.js index 7d35cb759c..6322ccd29d 100644 --- a/resources/src/mediawiki/page/watch.js +++ b/resources/src/mediawiki/page/watch.js @@ -5,8 +5,9 @@ * @class mw.page.watch.ajax */ ( function ( mw, $ ) { - // The name of the page to watch or unwatch - var title = mw.config.get( 'wgRelevantPageName' ); + var watch, + // The name of the page to watch or unwatch + title = mw.config.get( 'wgRelevantPageName' ); /** * Update the link text, link href attribute and (if applicable) @@ -96,9 +97,17 @@ } // Expose public methods - mw.page.watch = { + watch = { updateWatchLink: updateWatchLink }; + module.exports = watch; + + // Deprecated since 1.30 + mw.log.deprecate( mw, 'page', + { watch: watch }, + 'Use require( \'mediawiki.page.watch.ajax\' ) instead.', + 'mw.page' + ); $( function () { var $links = $( '.mw-watchlink a, a.mw-watchlink' );