here is a copy of the script i have
setInterval(removeSpam, 2000);
function removeSpam() {
var spanTags = document.getElementsByTagName(’span’);
var spamNames = [’Huffington Post’, ‘The Huffington Post’, ‘Salon’, ‘Salon.com’, ‘Vox’, ‘Vox.com’, ‘HuffPost’ ];
var found;
for (var i = 0; i < spanTags.length; i++) {
if (contains(spamNames, spanTags[i].textContent)) {
found = spanTags[i];
parentBlock = getParent(getParent(getParent(getParent(found))));
removeAllChildren(parentBlock);
}
}
}
function getParent(o) {
return o.parentNode;
}
function contains(a, obj) {
var i = a.length;
while (i—) {
if (a[i] === obj) {
return true;
}
}
return false;
}
function removeAllChildren(o) {
while (o.firstChild) {
o.removeChild(o.firstChild);
Why the F would you EVER want to use Yahoo? It’s like Google plus a constant stream of ultra-left bloggers presented as News.
Why not block it at your router or your Hosts file? Youd see the reference on Yahoo but youd never be able to go there.
You cannot in general terms add JavaScript to a web page coming from another server. You can inject the JavaScript by creating your own page on your file system. That page would need to have a frame to host the yahoo page. Since you JavaScript would be on the parent it could overwrite the urls in the child page.
With the Adblock Plus browser add-on, you can block any web site just by adding the URL to Adblock Plus’ list.
IMHO, Adblock Plus is a must have. My personal list of blocked items is very long.
NoScript blocks *everything* java unless you mark it as trusted. It’s a little annoying at first, but once it’s set up it’s great.
search for a script to “remove fox news” and then alter it... as I am sure google will have it right up front for you.