User:Skizzerz/global.js

function checkdelete { if(queryString("submitdelete")=="true") document.getElementById('deleteconfirm').wpConfirmB.click }

function queryString(p) { var re = RegExp('[&?]' + p + '=([^&]*)'); var matches; if (matches = re.exec(document.location)) { try { return decodeURI(matches[1]); } catch (e) { }   }    return null; }

function checkmove { if(queryString("submitmove")=="true") { if(document.getElementById('wpConfirm') {           document.getElementById('movepage').wpConfirm.checked='checked'            document.getElementById('movepage').wpDeleteAndMove.click        } else {            document.getElementById('movepage').wpMove.click        }    } }

addOnloadHook(checkmove); addOnloadHook(checkdelete);