mediawiki-extensions-Nuke/ext.nuke.confirm.js
Amir Sarabadani 95bc436d9f Fix wrong use of mw.msg
See https://www.mediawiki.org/wiki/Manual:Messages_API#mw.msg

Bug: T131975
Change-Id: Ib8aa253cb1f994c7abf8939c649a488411455e2f
2018-01-21 21:57:13 +01:00

15 lines
374 B
JavaScript

( 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 ) );