User:Charitwo/monobook.js

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

if(wgNamespaceNumber != -1) addOnloadHook(addDeleteButtons) function addDeleteButtons { if(!document.getElementById('ca-delete')) return var url=document.getElementById('ca-delete').firstChild.href //examples: addPortletLink('p-cactions', url + '&submitdelete=true&wpReason=' + encodeURIComponent('unused/broken') ,'sdelete','ca-delete1'); }

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