mediawiki-extensions-Nuke/ext.nuke.confirm.js
Amir Sarabadani 5b555c94f4 Remove unneeded $.ready()
Change-Id: I72b0b185ea5f48df06e680b9a61a967c6f9c60e8
2018-01-21 22:25:22 +01:00

15 lines
356 B
JavaScript

( function ( mw, $ ) {
$( function () {
/*global confirm */
// Confirm nuke
$( 'form[name="nukelist"]' ).on( 'submit', function () {
var pages = $( this ).find( 'input[name="pages[]"][type="checkbox"]:checked' );
if ( pages.length ) {
return confirm( mw.msg( 'nuke-confirm', pages.length ) );
}
} );
} );
}( mediaWiki, jQuery ) );