mediawiki-extensions-Nuke/modules/ext.nuke.confirm.js
Fomafix 2b320e7ec6 Use explicit mw.msg() instead of implicit mw.message()
The mw.Message object from mw.message() gets implicit converted to a
string.

Change-Id: Id95446bdd2a47bf0262220b3b962e4f747d7c31c
2022-07-24 18:44:16 +00:00

15 lines
410 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.msg( 'nuke-confirm', $pages.length ) );
}
} );
} );
}() );