/* *************************************************************** */
/* RECORD WIZARD SUGAR ******************************************* */
/*Confirmation message when users try to leave the Record Wizard
(works from the second step onwards) */
$(function() {
if (mw.config.get('wgPageName') !== 'Special:RecordWizard') {
return;
}
window.onbeforeunload = function() {
return "Do you want to leave the page? All your unsaved changes will be lost.";
};
});
/*
if (mw.config.get('wgPageName') === 'Special:RecordWizard') {
window.onbeforeunload = function() {
return "Do you want to leave the page? All your unsaved changes will be lost.";
};
}
*/
MediaWiki:Common.js add a modal warning on leaving :
This could be integrated to the plugin itself.