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

15 lines
374 B
JavaScript
Raw Normal View History

( function ( mw, $ ) {
$( document ).ready( 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 ) );