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 03:57, 18 October 2006 view sourceBetacommand (talk | contribs)86,927 edits geocities← Previous edit Revision as of 04:08, 18 October 2006 view source Betacommand (talk | contribs)86,927 edits FlickrNext 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 geocities LINK REMOVAL CODE // BEGIN Flickr LINK REMOVAL CODE
//check if we are editing and we want to geocities //check if we are editing and we want to Flickr
if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('geocities=1') != -1) { if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('Flickr=1') != -1) {
function geocities() { function Flickr() {
document.getElementById('wpSummary').value = "Removing geocities link against policy to link to Search Engines"; document.getElementById('wpSummary').value = "Removing Flickr link against policy to link to Search Engines";
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(){ geocities(); }); addOnloadHook(function(){ Flickr(); });
} }
//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&geocities=1"; var taburl = "http://en.wikipedia.org/search/?title="+wgPageName+"&action=edit&Flickr=1";
addTab(taburl, "Remove geocities!", "ca-geocities", "This is to kill geocities Links"); addTab(taburl, "Remove Flickr!", "ca-Flickr", "This is to kill Flickr Links");
}); });
} }
//END geocities LINK REMOVAL CODE //END Flickr LINK REMOVAL CODE

Revision as of 04:08, 18 October 2006

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