User:Skizzerz/Scripts/QuickDelete.js

function quickDeleteSetup { var dt = document.getElementById('ca-delete'); if(!dt) return; for(var i = 0; i < qdId.length; i++) addToolboxItem(qdId[i], ugPage + '&action=delete&wpReason=' + qdText[i] + '&submitdelete=true', qdDisp[i]); }

addOnloadHook(quickDeleteSetup);

// semi automatic deletion function checkDelete { if(queryString("submitdelete") == "true" && wgAction == "delete") { if( document.getElementById('deleteconfirm')) { document.getElementById('deleteconfirm').wpConfirmB.click; return; } else { //stupid image deletion form doesn't have names and ID's and crap var inputs = document.getElementsByTagName('input'); for(var i = 0; i < inputs.length; i++) { if(inputs[i].type == 'submit' && inputs[i].value == 'Delete') { inputs[i].click; return; }			}		}	} }

addOnloadHook(checkDelete);