mediawiki-extensions-Nuke/ext.nuke.confirm.js

15 lines
360 B
JavaScript
Raw Normal View History

( 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.message( 'nuke-confirm', pages.length ) );
}
} );
} );
}( mediaWiki, jQuery ) );