Blocking attribute but not whole element

Everything about using Adblock Plus on Google Chrome
Post Reply
Ryulong
Posts: 5
Joined: Tue Mar 20, 2012 7:43 am

Blocking attribute but not whole element

Post by Ryulong »

When viewing Instagram (and having already used ABP to disable the clickshield), it seems that when using Chrome the user is forced to view a lower resolution version of the photo rather than the full resolution which can be accessed on Firefox (again with ABP disabling the clickshield). The general element responsible is here:

Code: Select all

<img alt="[image alt-text]" class="_2di5p" decoding="auto" style="" sizes="Xpx" srcset="[640x640 image URL] 640w,[750x750 image URL] 750w,[original image URL] 1080w" src="[original image URL]">
I've managed to find out that by deleting the "sizes" attribute in the DevTools window (the number changes based on the browser size or the particular page on Instagram), the original image URL is the one that gets read rather than the 640x640 or 750x750 variations. Can ABP be used to just block the following piece of code but not the entire element holding it?

Code: Select all

sizes="*px"
I copied the above code from https://www.instagram.com/p/BglxeOMn0Ni/, removing all the specific alt-text and URLs, but this format is the same across all of Instagram, either when viewing in the whole feed or on individual pages.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Blocking attribute but not whole element

Post by mapx »

No, ABP cannot do what you want, you need some userscript or userstyle.
Post Reply