MediaWiki:DeleteLinking.js

From Wikimedia Commons, the free media repository
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.
 // <nowiki>
 
 var deletewithoutlinking3 = (deletewithoutlinking3 ? true : false);
 var deletewithlinking3 = true;
 var deletekeep3 = (deletekeep3 ? true : false);
 var duplicate3 = (duplicate3 ? true : false);
 
 var deletereasonslinking = "deleted|regular deletion";             // Delete with linking
 
 function fillActionPageDeleteWithLinking() {
    if (getParamValue("deletereason") > "") {
      if (getParamValue("linking") > '') {
        document.forms[0].wpReason.value = getParamValue("deletereason") + ', see [[' + getParamValue("linking") + '|reason]]';
      }
      if (mw.config.get('wgNamespaceNumber') != 6) {
        window.setTimeout(function() { document.getElementById("deleteconfirm").wpConfirmB.click(); }, 100);
      } else {
       window.setTimeout(function() { document.getElementsById('mw-filedelete-submit').click(); }, 100);
      }
    }
 }
 
 if ((getParamValue("deletereason") > "") && (getParamValue("linking") > "")) {
   $(document).ready(fillActionPageDeleteWithLinking);
 }
 
 // </nowiki>