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 04:16, 18 October 2006 view sourceBetacommand (talk | contribs)86,927 editsNo edit summary← Previous edit Revision as of 04:22, 18 October 2006 view source Betacommand (talk | contribs)86,927 editsNo edit summaryNext edit →
Line 7: Line 7:
document.getElementById('wpSummary').value = "Removing Flickr 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();

Revision as of 04:22, 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