User:Veinor/Spam.js

//Written by User:GeorgeMoney, thanks to User:Where and User:Eagle_101 for help with this! //Modified by User:Betacommand // BEGIN MYSPACE LINK REMOVAL CODE //check if we are editing and we want to myspace if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('myspace=1') != -1) { function myspace { document.getElementById('wpSummary').value = "Removing Myspace link as unverifiable and against policy WP:EL"; var contents = document.getElementById('wpTextbox1').value; var newcontents = contents.replace(/(\*\s*?)?\[http\:\/\/\w*?myspace\.com.*?\]/g, ""); document.getElementById('wpTextbox1').value = newcontents; document.getElementById('wpDiff').click; document.getElementById('wpWatchthis').checked = ""; }   addOnloadHook(function{ myspace; }); } //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&myspace=1";   addTab(taburl, "Remove Myspace!", "ca-myspace", "This is to kill Myspace Links");   }); } //END MYSPACE LINK REMOVAL CODE //////////////////////////////////////////////// //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 Search Engines"; 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