Please help with custom filter

Vadim Bryksin

New Member
Hi Guys

I went through the official documentation on custom filters but it is somewhat head breaking...

Here is the problem:
The site started showing ads, and <div>'s are with random ID's each refresh, so it is not possible to block HTML element simple as that, however, after inspecting the code of the element I noticed that all adds are using pictures in Base64 data format, so I figured out Xpath with regex to find those elements, and it works,
but now im not getting how to incorporate this regex with the domain

here is xpath:
Code:
//*[contains(@style, 'url("data:image/png;base64,')]/parent::*/../..
So we are looking for any element, where style has base64 image and 3 parents up from it

How do I do Rule with that?
 

Alex302

Filters Developer
Staff member
Administrator
Hi
I need to see the real example.
Xpath is not supported by AdGuard.
 

Alex302

Filters Developer
Staff member
Administrator
Added
Code:
crackwatch.com#$#div[style$="text-align: center;"] > div > a[rel="nofollow noopener noreferrer"] > span { height: 1px!important; min-height: 1px!important; background-image: none!important; }
 
Top