Ability to block linkable item?

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
blocker-fan
Posts: 1
Joined: Wed Apr 01, 2015 8:40 pm

Ability to block linkable item?

Post by blocker-fan »

Hi,

I was wondering if there's an option in Adblock Plus to block the linking URl attached to an image?

I have a few sites that have links on images that I would prefer to block the link because it redirects to an unnecessary page, that I may accidentally click on.

A little outside Adblock's realm but I was wondering if there's such a way to enable it?

Perhaps there's a GreaseMonkey script someone knows of that would augment Adblock plus in regard to this?

Thanks!
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Ability to block linkable item?

Post by mapx »

example pages ?

anyway, you could use stylish
see example
forum/viewtopic.php?p=119962#p119962
User avatar
Gingerbread Man
Posts: 1339
Joined: Fri Aug 12, 2011 5:28 am

Re: Ability to block linkable item?

Post by Gingerbread Man »

Hello,
blocker-fan wrote:I was wondering if there's an option in Adblock Plus to block the linking URl attached to an image?
Create a filter like the following, where example.com is the site you're on, and badsite.evil is the URL you don't want to accidentally visit. You can also omit example.com altogether if you want to apply the filter to all sites you visit.

Code: Select all

example.com##a[href*="badsite.evil"]
en/filters#elemhide_attributes

Caveats:
  1. This may not work if the link directs you to a new page using JavaScript rather than an href attribute. This shouldn't be common.
  2. There's no way to block the image in this case. So you'll still download it, and it will be hidden from view.
Post Reply