MediaWiki:DeleteKeep.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
Documentation for this user script can be added at MediaWiki:DeleteKeep. |
// <nowiki>
var deletewithoutlinking3 = (deletewithoutlinking3 ? true : false);
var deletewithlinking3 = (deletewithlinking3 ? true : false);
var deletekeep3 = true;
var duplicate3 = (duplicate3 ? true : false);
function deleteimage(save) { // DerHexer
if (!save) save = false;
var m = /===((.(?!===))*.)===/(document.editform.wpTextbox1.value);
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace(/\=\=\=/, "\{\{delh\}\}\n===");
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + '\-\-\-\-\n\'\'\'deleted\'\'\', --\~\~\~\~\n\n\{\{delf\}\}';
document.editform.wpSummary.value = 'deleted';
if (save == true) document.editform.wpSave.click();
}
function keepimage() { // DerHexer
var m = /===((.(?!===))*.)===/(document.editform.wpTextbox1.value);
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value.replace(/\=\=\=/, "\{\{delh\}\}\n===");
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + '\-\-\-\-\n\'\'\'kept\'\'\', --\~\~\~\~\n\n\{\{delf\}\}';
document.editform.wpSummary.value = 'kept';
}
// </nowiki>