Unable to block specific image on a webpage

T4lgb7

New Member
Unlike with Ublock Origin, using the "element" picker option does not seem to apply/work even though I select the option to "apply to all websites".

Take for instance this script copied from Ublock Origin: ||cdn.iphoneincanada.ca/wp-content/uploads/2021/03/rogers-shaw*.jpeg$image

When I use Ublock Origin and add this script, it will block this image regardless if it's used on subsequent webpages belonging to that site.

The actual link to that image is: https://cdn.iphoneincanada.ca/wp-content/uploads/2021/03/rogers-shaw.jpeg

In contrast, Adguard's script for the same image only applies to that (one) page, sometimes, not even that.

Here's the Adguard script it created and I tested on three different iphoneincanda webpages. It doesn't work on other pages because it's not blocking https://cdn.iphoneincanada.ca/wp-content/uploads/2021/03/rogers-shaw.jpeg.

If there would be a way to block the actual link to the image: https://cdn.iphoneincanada.ca/wp-content/uploads/2021/03/rogers-shaw.jpeg that would be a workaround, but Adguard element picker doesn't work well.

Below is Adguard script created using element picker:

iphoneincanada.ca##div.wrapper:nth-child(9) > section.container.container--singular:nth-child(2) > main.post-single.single-post--379847:nth-child(2) > div.content.content--singular:nth-child(3) > p:first-child > img.aligncenter.size-full.wp-image-349900
##div.wrapper:nth-child(9) > section.container.container--singular:nth-child(2) > main.post-single.single-post--379805:nth-child(2) > div.content.content--singular:nth-child(3) > p:first-child > img.aligncenter.size-full.wp-image-349900
##div.wrapper:nth-child(9) > section.container.container--singular:nth-child(2) > main.post-single.single-post--378948:nth-child(2) > div.content.content--singular:nth-child(3) > p:first-child
 
Last edited:

Blaz

Moderator & Translator
Staff member
Moderator
Expected behaviour to only work on one page since it is an element hiding rule and not an URL block rule like the one in ublock.
 

Blaz

Moderator & Translator
Staff member
Moderator
Just add the url blocking rule to user filter.

Element hiding rules via elements picker, url blocking rules via filtering log.
 

T4lgb7

New Member
Just add the url blocking rule to user filter.

Element hiding rules via elements picker, url blocking rules via filtering log.
I never was able to figure out how to do that with a script/manually. I only know how to add via context menu.
 
Top