mediawiki-extensions-Nuke/modules/ext.nuke.confirm.js
Umherirrender 1aba9c8d3e Move js into own modules folder
There is no need to have it in the root folder

Change-Id: Ifd97e09d6607129c7be52ac28ab3fc5bae909a63
2021-03-12 19:34:07 +01:00

15 lines
414 B
JavaScript

( function () {
$( function () {
// Confirm nuke
// eslint-disable-next-line no-jquery/no-global-selector
$( 'form[name="nukelist"]' ).on( 'submit', function () {
var $pages = $( this ).find( 'input[name="pages[]"][type="checkbox"]:checked' );
if ( $pages.length ) {
// eslint-disable-next-line no-alert
return confirm( mw.message( 'nuke-confirm', $pages.length ) );
}
} );
} );
}() );