Merge "maintenance: Script to rename titles for Unicode uppercasing changes"
[lhc/web/wiklou.git] / resources / src / mediawiki.special.unwatchedPages / unwatchedPages.js
index 7783ff7..abc8d7b 100644 (file)
@@ -3,7 +3,7 @@
  */
 ( function () {
        $( function () {
-               $( 'a.mw-watch-link' ).click( function ( e ) {
+               $( 'a.mw-watch-link' ).on( 'click', function ( e ) {
                        var promise,
                                api = new mw.Api(),
                                $link = $( this ),
@@ -17,6 +17,7 @@
                        mw.loader.load( 'mediawiki.notification' );
 
                        // Use the class to determine whether to watch or unwatch
+                       // eslint-disable-next-line no-jquery/no-class-state
                        if ( !$subjectLink.hasClass( 'mw-watched-item' ) ) {
                                $link.text( mw.msg( 'watching' ) );
                                promise = api.watch( title ).done( function () {