Merge "Update populateRevisionSha1.php for MCR schema changes"
[lhc/web/wiklou.git] / resources / src / mediawiki.rollback.confirmation.js
index 8bf6786..5be49f0 100644 (file)
                $form.appendTo( 'body' ).trigger( 'submit' );
        };
 
-       $( '.mw-rollback-link a' ).each( function () {
-               $( this ).confirmable( {
-                       i18n: {
-                               confirm: mw.msg( 'rollback-confirmation-confirm', $( this ).data( 'rollback-count' ) ),
-                               yes: mw.msg( 'rollback-confirmation-yes' ),
-                               no: mw.msg( 'rollback-confirmation-no' )
-                       },
-                       handler: function ( e ) {
-                               e.preventDefault();
-                               postRollback( $( this ).attr( 'href' ) );
-                       }
-               } );
+       $( '#mw-content-text' ).confirmable( {
+               i18n: {
+                       confirm: mw.msg( 'rollback-confirmation-confirm' ),
+                       yes: mw.msg( 'rollback-confirmation-yes' ),
+                       no: mw.msg( 'rollback-confirmation-no' )
+               },
+               delegate: '.mw-rollback-link a[data-mw="interface"]',
+               handler: function ( e ) {
+                       e.preventDefault();
+                       postRollback( $( this ).attr( 'href' ) );
+               }
        } );
 
 }() );