Merge "mediawiki.page.patrol: Use this.href instead of $(this).attr('href')"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 19 May 2016 17:45:24 +0000 (17:45 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 19 May 2016 17:45:24 +0000 (17:45 +0000)
resources/src/mediawiki/page/patrol.ajax.js

index a63202f..ec68b3c 100644 (file)
@@ -14,7 +14,7 @@
        $( function () {
                var $patrolLinks = $( '.patrollink a' );
                $patrolLinks.on( 'click', function ( e ) {
-                       var $spinner, href, rcid, apiRequest;
+                       var $spinner, rcid, apiRequest;
 
                        // Start preloading the notification module (normally loaded by mw.notify())
                        mw.loader.load( 'mediawiki.notification' );
@@ -26,8 +26,7 @@
                        } );
                        $( this ).hide().after( $spinner );
 
-                       href = $( this ).attr( 'href' );
-                       rcid = mw.util.getParamValue( 'rcid', href );
+                       rcid = mw.util.getParamValue( 'rcid', this.href );
                        apiRequest = new mw.Api();
 
                        apiRequest.postWithToken( 'patrol', {