Blocking certain images in Chrome

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
JKM
Forum Contributor
Posts: 221
Joined: Tue Jun 17, 2008 8:12 pm

Blocking certain images in Chrome

Post by JKM »

I'm not sure if this is the correct category to post in, but I've seen javascripts (addons) like this before (i think).

But does anyone know about a script that can block certain images on pages? For example if i want to block all Facebook images that contains:

Code: Select all

https:// * fbcdn.net/ * _180002021_ * 
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Blocking certain images in Chrome

Post by Celauran »

You could try iterating over each img element, comparing the src attribute against some regular expression, and hiding the element if there's a match.
Post Reply