Block third-party items except from blogger.com

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
Gingerbread Guy

Block third-party items except from blogger.com

Post by Gingerbread Guy »

Could someone please help me write a filter? I'd like to block all third-party on blogspot.com, except those from blogger.com.

Code: Select all

*$domain=blogspot.com,third-party
This is what I've got right now. Since Adblock Plus flags this filter as unoptimized, I'd like to specify the exception in it, rather than have a separate exception filter. I had a look at the RegExp documentation, where it says,
"[^xyz] - matches anything that is not enclosed in the brackets."

But if I change the filter as follows, it no longer blocks anything, and the unoptimized warning disappears, as if it's not a (valid) regular expression.

Code: Select all

[^blogger]$domain=blogspot.com,third-party
User avatar
Adblock Plus Fan
Posts: 1255
Joined: Sat Feb 24, 2007 11:08 am

Re: Block third-party items except from blogger.com

Post by Adblock Plus Fan »

Gingerbread Guy wrote:as if it's not a (valid) regular expression.
That's because regexps filters in ABP need to begin and end with the slash symbol /

Gingerbread Guy wrote:Since Adblock Plus flags this filter as unoptimized, I'd like to specify the exception in it
You might be thinking it will help optimize your filter by combining it into one string, but making your regexp more complex won't help you.
I'd recommend you make a separate but optimised exception instead. Something like this:
@@|http://www.blogger.com/$domain=blogspot.com
Gingerbread Guy

Re: Block third-party items except from blogger.com

Post by Gingerbread Guy »

Adblock Plus Fan wrote:That's because regexps filters in ABP need to begin and end with the slash symbol /

Code: Select all

/[^blogger]$domain=blogspot.com,third-party
The above filter behaves the same way.
Adblock Plus Fan wrote:You might be thinking it will help optimize your filter by combining it into one string
No, I'm thinking it's already unoptimized, so why not reduce clutter by having only one filter instead of two.

Thank you for the reply.
User avatar
Adblock Plus Fan
Posts: 1255
Joined: Sat Feb 24, 2007 11:08 am

Re: Block third-party items except from blogger.com

Post by Adblock Plus Fan »

Gingerbread Guy wrote:I'm thinking it's already unoptimized
Then why unoptimise it further, making it more complex and worse?
I still recommend you to do the whitelisting instead. It's way easier for you.
asdf

Post by asdf »

You could save yourself some headaches with the latest version of Request Policy.
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

This should be taken care of now (if you're using the EasyList) :arrow: :arrow: :arrow:
Locked