User:Δ/Sandbox.js

//Written by User:GeorgeMoney, thanks to User:Where and User:Eagle_101 for help with this! //Modified by User:Betacommand // BEGIN prodspec LINK REMOVAL CODE //check if we are editing and we want to prodspec if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('prodspec=1') != -1) { function prodspec { document.getElementById('wpSummary').value = "Removing prodspec link as unverifiable and against policy WP:EL"; var reason = prompt("Which warning do you wish to issue?"); document.editform.wpTextbox1.value = ''+ reason + '\n' + document.editform.wpTextbox1.value; document.editform.wpSummary.value = 'This page has been proposed for deletion and will be deleted in 5 days if no one objects.'; document.getElementById('wpSave').click; document.getElementById('wpWatchthis').checked = "true"; }   addOnloadHook(function{ prodspec; }); } //Check if it's article to add the tab if(mw.config.get('wgCanonicalNamespace') == "") { addOnloadHook(function{   var taburl = "http://en.wikipedia.org/w/index.php?title="+mw.config.get('wgPageName')+"&action=edit&prodspec=1";   addTab(taburl, "Prod!", "ca-prodspec", "This PRODs articles");   }); }