Free Republic
Browse · Search
General/Chat
Topics · Post Article


1 posted on 02/26/2018 3:18:58 AM PST by paladinkc
[ Post Reply | Private Reply | View Replies ]


To: paladinkc

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);


2 posted on 02/26/2018 3:21:13 AM PST by paladinkc (release the inmates and lock me up so they can pay for my vacation! Let them see how they like it!)
[ Post Reply | Private Reply | To 1 | View Replies ]

To: paladinkc

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.


3 posted on 02/26/2018 3:24:32 AM PST by dangus (.)
[ Post Reply | Private Reply | To 1 | View Replies ]

To: paladinkc

Why not block it at your router or your Hosts file? You’d see the reference on Yahoo but you’d never be able to go there.


4 posted on 02/26/2018 4:03:09 AM PST by ConservativeMind (Trump: Befuddling Democrats, Republicans, and the Media for the benefit of the US and all mankind.)
[ Post Reply | Private Reply | To 1 | View Replies ]

To: paladinkc

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.


5 posted on 02/26/2018 4:18:30 AM PST by enotheisen (CMSGT USAF Ret)
[ Post Reply | Private Reply | To 1 | View Replies ]

To: paladinkc

"You should be using
"Misfit Garage" instead
of Grease Monkey..."


9 posted on 02/26/2018 5:39:08 AM PST by moovova
[ Post Reply | Private Reply | To 1 | View Replies ]

To: paladinkc

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.


12 posted on 02/26/2018 6:29:27 AM PST by upchuck (Keep a sharp lookout. The best is yet to come.)
[ Post Reply | Private Reply | To 1 | View Replies ]

To: paladinkc
I use uBlock Origin, and use its element picker to do cosmetic blocking on everything on Yahoo's finance page except the numbers for the stock market quotes. This prevents the screen from being filled with anti-Trump hit pieces. This might also work for your purpose.
13 posted on 02/26/2018 6:53:30 AM PST by snarkpup (Fake news is one-half of the problem. Fake education is the other half.)
[ Post Reply | Private Reply | To 1 | View Replies ]

To: paladinkc

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.


14 posted on 02/26/2018 7:36:02 AM PST by Cats1
[ Post Reply | Private Reply | To 1 | View Replies ]

To: paladinkc

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.


15 posted on 02/26/2018 7:37:08 AM PST by willyd (I for one welcome our NSA overlords)
[ Post Reply | Private Reply | To 1 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson