Custom Filter help

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
flagpole
Posts: 3
Joined: Sun Dec 31, 2017 12:03 pm
Contact:

Custom Filter help

Post by flagpole »

Hi not sure if this is the right place but i'll ask and see.

the daily mail website when you visit it with abp running there is a large white section where an ad used to be. which the element hiding helper identifies as:

Code: Select all

dailymail.co.uk##iframe[style="140843754:597330557;margin-bottom:0;2981248938:3417083795;border:0;4092633298:3814947365;width:100%;1209698098:2077508309;height:250px;2319258050:2145202134;"]
which gerericise :? as :

Code: Select all

dailymail.co.uk##iframe[style="*margin-bottom:0*border:0*width:100%*height:250px*"]
which unsurprisingly doesn't work. I wonder if anyone else can help short of blocking all iframes
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Custom Filter help

Post by mapx »

You can't use wildcards that way

Use:

Code: Select all

dailymail.co.uk##iframe[style*="margin-bottom:0"]
(see where is used wildcard)

read more about hiding filters:
en/filters#elemhide_attributes
flagpole
Posts: 3
Joined: Sun Dec 31, 2017 12:03 pm
Contact:

Re: Custom Filter help

Post by flagpole »

Excellent, thank you. so would i be right in thinking that:

Code: Select all

dailymail.co.uk##iframe[style*="margin-bottom:0"][style*="height:250px"]
would match margin-bottom = 0 && height 250 ?

I had thought we were performing like a regex on the text of the style rules, but it seems we are perfoming it on the style attributes themselves?
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Custom Filter help

Post by mapx »

you can use regex only in the extended css filters (and obviously in the blocking filters)
en/filters#elemhide-emulation
flagpole
Posts: 3
Joined: Sun Dec 31, 2017 12:03 pm
Contact:

Re: Custom Filter help

Post by flagpole »

yeah i see that. actually this way is better. it's just the way i was thinking about it was that we were patern matching the text of the style rules rather than the actual rules themselves.

but that is not the case.

thankyou foryour help.
Post Reply