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.
// Outline for an automatic delete link generator.// Not highly tested. Started by Splarka @ test.wikipedia// Written for & maintained by Mike_lifeguard @ en.wikibooks//GO IF contribs or log or newpages or [article AND (submit|view|purge)]if("Contributions Whatlinkshere Log Prefixindex Newpages".indexOf(wgCanonicalSpecialPageName)!=-1||(wgIsArticle==true&&(wgAction=="submit"||wgAction=="view"||wgAction=="purge")))$(document).ready(function(){mw.util.addPortletLink('p-cactions','javascript:deleteLinkify()','AutoDelete','ca-dellink','generate deletion links');});functiondeleteLinkify(){varreason=prompt('Enter default delete reason','per [[COM:SPEEDY]]');if(!reason)return;vararp=mw.config.get('wgServer')+mw.config.get('wgArticlePath').replace(/\$1/,'');vararp2=(arp.indexOf('//')==0)?document.location.protocol+arp:null;// Protocol relative wgServer?$('#bodyContent a').each(function(){if(this.href.indexOf(arp)==0||arp2&&this.href.indexOf(arp2)==0){if(this.href.indexOf('action=delete')==-1&&this.href.indexOf('/Special:')==-1){this.href+='?action=delete&submitdelete=true&deletetalkalso=true&wpReason='+encodeURIComponent(reason);this.innerHTML+=' (delete)';}}});}if(queryString('submitdelete')=='true')$(document).ready(function(){varsub=(document.getElementById('wpConfirmB'))?document.getElementById('wpConfirmB'):document.getElementById('mw-filedelete-submit')if(document.getElementById('ca-talk').className.indexOf('new')==-1&&queryString('deletetalkalso')=='true'&&(wgNamespaceNumber%2==0)){//if the talk tab is redlinked and this is the first time 'round AND this is not a talk page then:sub.action+='&deletetalk=true&wpReason='+queryString('wpReason');}sub.click();})if(wgAction=='delete'&&queryString('deletetalk')=='true')$(document).ready(function(){varurl=document.getElementById('ca-talk').getElementsByTagName('a')[0].href+'?action=delete&submitdelete=true&wpReason='+queryString('wpReason');document.location.href=url;})functionqueryString(p){varre=RegExp('[&?]'+p+'=([^&]*)');varmatches;if(matches=re.exec(document.location)){try{returndecodeURI(matches[1]);}catch(e){}}returnnull;}