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 18:50, 13 September 2006 view sourceBetacommand (talk | contribs)86,927 editsm Revert to revision 75552872 by Betacommand.← Previous edit Revision as of 21:01, 13 September 2006 view source Betacommand (talk | contribs)86,927 editsNo edit summaryNext edit →
Line 1: Line 1:
//Written by ], thanks to ] and ] for help with this! //Written by ], thanks to ] and ] for help with this!
//Modified by ] //Modified by ]
// BEGIN tripod LINK REMOVAL CODE // BEGIN blogspot LINK REMOVAL CODE
//check if we are editing and we want to tripod //check if we are editing and we want to blogspot
if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('tripod=1') != -1) { if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('blogspot=1') != -1) {
function tripod() { function blogspot() {
document.getElementById('wpSummary').value = "Removing tripod link as unverifiable and against policy ]"; document.getElementById('wpSummary').value = "Removing blogspot link as unverifiable and against policy ]";
var contents = document.getElementById('wpTextbox1').value; var contents = document.getElementById('wpTextbox1').value;
var newcontents = contents.replace(/(\*\s*?)?\/g, ""); var newcontents = contents.replace(/(\*\s*?)?\/g, "");
document.getElementById('wpTextbox1').value = newcontents; document.getElementById('wpTextbox1').value = newcontents;
document.getElementById('wpDiff').click(); document.getElementById('wpDiff').click();
document.getElementById('wpWatchthis').checked = ""; document.getElementById('wpWatchthis').checked = "";
} }
addOnloadHook(function(){ tripod(); }); addOnloadHook(function(){ blogspot(); });
} }
//Check if it's article to add the tab //Check if it's article to add the tab
if(wgCanonicalNamespace == "") { if(wgCanonicalNamespace == "") {
addOnloadHook(function(){ addOnloadHook(function(){
var taburl = "http://en.wikipedia.org/search/?title="+wgPageName+"&action=edit&tripod=1"; var taburl = "http://en.wikipedia.org/search/?title="+wgPageName+"&action=edit&blogspot=1";
addTab(taburl, "Remove tripod!", "ca-tripod", "This is to kill tripod Links"); addTab(taburl, "Remove blogspot!", "ca-blogspot", "This is to kill blogspot Links");
}); });
} }
//END tripod LINK REMOVAL CODE //END blogspot LINK REMOVAL CODE

Revision as of 21:01, 13 September 2006

//Written by ], thanks to ] and ] for help with this!
//Modified by ]
// BEGIN blogspot LINK REMOVAL CODE
//check if we are editing and we want to blogspot
if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('blogspot=1') != -1) {
  function blogspot() {
    document.getElementById('wpSummary').value = "Removing blogspot link as unverifiable and against policy ]";
        var contents = document.getElementById('wpTextbox1').value;
        var newcontents = contents.replace(/(\*\s*?)?\/g, "");
        document.getElementById('wpTextbox1').value = newcontents;
        document.getElementById('wpDiff').click();
        document.getElementById('wpWatchthis').checked = "";
}
    addOnloadHook(function(){ blogspot(); });
}
//Check if it's article to add the tab
if(wgCanonicalNamespace == "") {
  addOnloadHook(function(){ 
   var taburl = "http://en.wikipedia.org/search/?title="+wgPageName+"&action=edit&blogspot=1";
   addTab(taburl, "Remove blogspot!", "ca-blogspot", "This is to kill blogspot Links"); 
  });
}
//END blogspot LINK REMOVAL CODE