How to make an exception on a page for only 1 rule?

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
guest)11

How to make an exception on a page for only 1 rule?

Post by guest)11 »

Is it possible to make an exception on a page for only one rule or (what is almost the same) make a rule that will work everywhere except some page?
If yes,then - how?
guest)11

Re: How to make an exception on a page for only 1 rule?

Post by guest)11 »

and if it's impossible, then it's a featurerequest for future builds :D
NJH
Posts: 60
Joined: Thu Jun 15, 2006 9:23 am
Location: Hampshire, England

Post by NJH »

Have a look at whitelisting in the Documentation.
guest)11

Post by guest)11 »

I know it, I had read it before I posted my msg here...
There is no answer to my question. There is described a method of defining exception rules for a page, but if I do so - then ALL the rules on that page will be excepted (i.e. blocked), and I need only 1 of them to be blocked on that page.
If I missunderstood something - please help me on a concrete example:
here is a link: http://www.tutmp3.net/download.php?id=6 ... 01&ext=mp3
I have many filters for that page... but there IS ONLY ONE of them, that I need TO BE BLOCKED:

Code: Select all

tutmp3.net##TD[style="border: 1px solid rgb(80, 80, 80); padding-top: 3px; padding-left: 8px; padding-right: 8px;"]
and i want it to blocked be only for the pages
http://www.tutmp3.net/download.php?*
and FOR OTHER pages of that site I want this filter WORK.


If you read carefully, then u'd know, that my problem is not so easy, as it seems.
Just to make it clear:
1. Making exception

Code: Select all

@@http://www.tutmp3.net/download.php?*
is WRONG.
2. Deleting exception

Code: Select all

tutmp3.net##TD[style="border: 1px solid rgb(80, 80, 80); padding-top: 3px; padding-left: 8px; padding-right: 8px;"]
is also WRONG.[/code]
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

Is this what you are trying to do?

Code: Select all

@@http://counter.yadro.ru/logo;tutmp3?
guest)11

Post by guest)11 »

damn, no :-)
i'm trying to make this rule

Code: Select all

tutmp3.net##TD[style="border: 1px solid rgb(80, 80, 80); padding-top: 3px; padding-left: 8px; padding-right: 8px;"]
be blocked (ignored) only for

Code: Select all

http://www.tutmp3.net/download.php?*
and in all other cases I want this rule work.
guest)11

Post by guest)11 »

oh, i understood why you have replied so - the link i had given is expired, here is a new link, as an example:
http://www.tutmp3.net/download.php?id=1 ... me&ext=mp3
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

guest)11 wrote: 1. Making exception

Code: Select all

@@http://www.tutmp3.net/download.php?*
is WRONG.
That should work (it allows the element on that page here). There may be a problem if you are using Firefox beta 3. Are you?

Also, you must be using the newest ABP 0.7.5.4 for this feature to work correctly.
guest)11

Post by guest)11 »

I use ABP 0.7.5.4 and Firefox 2.0.0.14
Making exception

Code: Select all

@@http://www.tutmp3.net/download.php?*
is WRONG, cause it blocks ALL filters on that page, except blocking only 1 filter.
Please, read what I write more carefully...
:-/
Fox
Posts: 300
Joined: Sat Jun 10, 2006 3:05 pm
Location: Finland

Post by Fox »

guest)11 wrote:2. Deleting exception

Code: Select all

tutmp3.net##TD[style="border: 1px solid rgb(80, 80, 80); padding-top: 3px; padding-left: 8px; padding-right: 8px;"]
is also WRONG.[/code]
Delete that from Adblock Plus, and then use it with
Stylish: https://addons.mozilla.org/en-US/firefox/addon/2108
Or with UserContent.css: http://kb.mozillazine.org/UserContent.css

Code: Select all

@-moz-document url-prefix(http://www.tutmp3.net/) {


paste code here, sorry, no idea how to modify Adblock Plus code to work with Stylish/UserContent.css.


}
edit: url-prefix url can also be
http://www.tutmp3.net/download.php?
or whatever you want.

edit2: + whitelist that site with Adblock Plus with exception rule.
Then Adblock Plus will allow all, but Stylish/UserContent.css -will hide/delete that part.
I did understand that this is what you want.
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

@guest:

To answer your question simply ... you cannot name a particular 'page' with an element-hiding rule. You can only name a domain or subdomain. The only way you can whitelist elements is to make a 'general' exception for that page ... but then EVERYTHING is allowed. There are no other options for that.
guest)11

Post by guest)11 »

Fox wrote:Delete that from Adblock Plus, and then use it with
Stylish Or with UserContent.css

Code: Select all

@-moz-document url-prefix(http://www.tutmp3.net/download.php?) {
paste code here, sorry, no idea how to modify Adblock Plus code to work with Stylish/UserContent.css.
}
edit: + whitelist that site with Adblock Plus with exception rule.
Then Adblock Plus will allow all, but Stylish/UserContent.css -will hide/delete that part.
I did understand that this is what you want.
This is almost a right approach to the problem, but as you see it's very hard (especially for me :-() to convert a code from adblock to stylish (+ everything blocked by stylish will be loaded, but now shown)... so I thought about another way of solving the problem - to make possible creating the combined event: rule with an exception. Something like:

Code: Select all

*somerule*@@http://exception.to.it/*
that will simply block all content that includes *somerule* but it won't work for the site http://exception.to.it/*
I think it's worth requesting as a feature.

+ thx, at least you understood me right :-)


@rick752:
That's it! That's why I request a brand new feature: one (combined) element - a rule with an exception!
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

I don't know if that is possible because the 2 types of rules are totally unrelated. Even if it was possible, I'm sure that it would take a complex code and would probably create a massive performance 'hit' on ABP. :(

That is a question for Wladimir ... so I'll just let him answer this one.
Wladimir Palant

Post by Wladimir Palant »

Having whitelisting and element hiding work nicely with each other is hard enough and we don't have the issues there sorted out yet... No, we cannot have an exception for one rule/one page only, nor do I think we will be able to do that in near future. The exception will apply to all filters that match on the page.
Post Reply