User:Eulalia459678/monaco.js

// ================================================================================ // START Automated deletion button script system // ================================================================================ // Adds customizable one-click deletion buttons to any deletable page. 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('This is spam') ,'delete spam','ca-delete1'); addPortletLink('p-cactions', url + '&submitdelete=true&wpReason=' + encodeURIComponent('This is an unused redirect'),'delete redirect','ca-delete2'); }