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 16:59, 13 September 2006 view sourceBetacommand (talk | contribs)86,927 editsNo edit summary← Previous edit Revision as of 18:47, 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 msn LINK REMOVAL CODE // BEGIN tripod LINK REMOVAL CODE
//check if we are editing and we want to msn //check if we are editing and we want to tripod
if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('msn=1') != -1) { if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('tripod=1') != -1) {
function msn() { function tripod() {
document.getElementById('wpSummary').value = "Removing msn link as unverifiable and against policy ]"; document.getElementById('wpSummary').value = "Removing tripod 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(){ msn(); }); addOnloadHook(function(){ tripod(); });
} }
//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&msn=1"; var taburl = "http://en.wikipedia.org/search/?title="+wgPageName+"&action=edit&tripod=1";
addTab(taburl, "Remove msn!", "ca-msn", "This is to kill msn Links"); addTab(taburl, "Remove tripod!", "ca-tripod", "This is to kill tripod Links");
}); });
} }
//END msn LINK REMOVAL CODE //END tripod LINK REMOVAL CODE

Revision as of 18:47, 13 September 2006

//Written by ], thanks to ] and ] for help with this!
//Modified by ]
// BEGIN tripod LINK REMOVAL CODE
//check if we are editing and we want to tripod
if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('tripod=1') != -1) {
  function tripod() {
    document.getElementById('wpSummary').value = "Removing tripod 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(){ tripod(); });
}
//Check if it's article to add the tab
if(wgCanonicalNamespace == "") {
  addOnloadHook(function(){ 
   var taburl = "http://en.wikipedia.org/search/?title="+wgPageName+"&action=edit&tripod=1";
   addTab(taburl, "Remove tripod!", "ca-tripod", "This is to kill tripod Links"); 
  });
}
//END tripod LINK REMOVAL CODE