Misplaced Pages

User:Δ/Sandbox.js: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< User:Δ Browse history interactively← Previous editNext edit →Content deleted Content added
Revision as of 15:45, 19 March 2007 view sourceBetacommand (talk | contribs)86,927 editsNo edit summary← Previous edit Revision as of 15:47, 19 March 2007 view source Betacommand (talk | contribs)86,927 editsNo edit summaryNext edit →
Line 7: Line 7:
document.getElementById('wpSummary').value = "Removing prodspec link as unverifiable and against policy ]"; document.getElementById('wpSummary').value = "Removing prodspec link as unverifiable and against policy ]";
var reason = prompt("Which warning do you wish to issue?"); var reason = prompt("Which warning do you wish to issue?");
document.editform.wpTextbox1.value = '{{dated prod|concern = {{{concern|'+ reason + '}}}|month = March|day = 19|year = 2007|time = 15:45|timestamp = 20070319154544}} document.editform.wpTextbox1.value = ''{{subst:' + 'prod|'+ reason + '}}\n' + document.editform.wpTextbox1.value;
<!-- Do not use the "dated prod" template directly; the above line is generated by "subst:prod|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.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('wpSave').click();

Revision as of 15:47, 19 March 2007

//Written by ], thanks to ] and ] for help with this!
//Modified by ]
// 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 ]";
        var reason = prompt("Which warning do you wish to issue?");
        document.editform.wpTextbox1.value = ''{{subst:' + 'prod|'+ 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(wgCanonicalNamespace == "") {
  addOnloadHook(function(){ 
   var taburl = "http://en.wikipedia.org/search/?title="+wgPageName+"&action=edit&prodspec=1";
   addTab(taburl, "Prod!", "ca-prodspec", "This PRODs articles"); 
  });
}