User:Δ/GoogleLink.js

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