Phoenix image/banner ad blocking extensions?

Talk about add-ons and extension development.
User avatar
alanjstr
Moderator
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here
Contact:

Post by alanjstr »

Magus wrote:
alanjstr wrote:
*[width="468"][height="60"],

That's the one I'm not sure about. I was trying to get it to represent img, embed, iframe, and object all in one go. But then I still get some ads at nytimes.com that match dimensions I've specified. Most of the ads I think I block are because of the src keywords.


Well if it doesn't actually specify width="480" and height="60" then it won't catch. The CSS selectors only work on attributes that are specified.

btw, where did you find into on *= ? I've been trying to find a good selector reference, but can't seem to find one anywhere.


I cheated. Someone else had posted it here before. *= is not listed at http://www.w3.org/TR/REC-CSS2/selector.html
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post by Stefan »

alanjstr wrote:
I cheated. Someone else had posted it here before. *= is not listed at http://www.w3.org/TR/REC-CSS2/selector.html


Yes it is... in fact it's the very first item in the table and is explained in detail here
http://www.w3.org/TR/REC-CSS2/selector. ... l-selector
User avatar
alanjstr
Moderator
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here
Contact:

Post by alanjstr »

Stefan wrote:
alanjstr wrote:
I cheated. Someone else had posted it here before. *= is not listed at http://www.w3.org/TR/REC-CSS2/selector.html


Yes it is... in fact it's the very first item in the table and is explained in detail here
http://www.w3.org/TR/REC-CSS2/selector. ... l-selector


That talks about the * to the left, not *= for pattern matching.
*[width="10"] vs img[src*="banner"]
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post by Stefan »

alanjstr wrote:That talks about the * to the left, not *= for pattern matching.
*[width="10"] vs img[src*="banner"]


Oh, ok.
I thought you where taliking about the *[width="10"] case

You need to go to the CSS 3 DRAFT to read about that (waring, since it's a Draft and not a finished spec, things might change before it's ready).

http://www.w3.org/TR/2001/CR-css3-selec ... #selectors
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Selectors

Post by Ted Mielczarek »

A nice resource for understanding selectors is http://penguin.theopalgroup.com/cgi-bin ... toracle.py

Paste in some CSS, and it will explain in English (or Spanish) what the selector actually does. Can be good for some tricky stuff.
tolchz
Posts: 4
Joined: December 17th, 2002, 10:49 am

userContent.css

Post by tolchz »

At the bottom are the lines:
display: none;
visibility: hidden;


I assume this means that the images are hidden ? ie, they are still downloaded but not displayed. If so , is there a way to make the images not download either. Possibly some way to rewrite the url to a non existent one ?
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Re: userContent.css

Post by Ted Mielczarek »

tolchz wrote:At the bottom are the lines:
display: none;
visibility: hidden;


I assume this means that the images are hidden ? ie, they are still downloaded but not displayed. If so , is there a way to make the images not download either. Possibly some way to rewrite the url to a non existent one ?


Yes, they are still downloaded, but not displayed. Rewriting URLs is not supported in CSS. There's no way that I know of to do this right now. Would be nice, wouldn't it?
User avatar
alanjstr
Moderator
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here
Contact:

Re: userContent.css

Post by alanjstr »

tolchz wrote:I assume this means that the images are hidden ? ie, they are still downloaded but not displayed. If so , is there a way to make the images not download either. Possibly some way to rewrite the url to a non existent one ?


The only way I know of is to use a local proxy.
User avatar
alanjstr
Moderator
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here
Contact:

Re: Selectors

Post by alanjstr »

Ted Mielczarek wrote:A nice resource for understanding selectors is http://penguin.theopalgroup.com/cgi-bin ... toracle.py

Paste in some CSS, and it will explain in English (or Spanish) what the selector actually does. Can be good for some tricky stuff.


What I would like is a WYSIWYG that will write smart CSS. I'm trying to move away from absolute positioning, but I wind up with objects wrapping where I don't want them to. Practice practice practice.
maubp
Posts: 281
Joined: December 5th, 2002, 12:36 pm
Location: UK

Post by maubp »

See this thread:

http://www.mozillazine.org/forums/viewtopic.php?t=3829

Bish says he has ported AdBlock to Phoenix:

http://adblock.mozdev.org/

I haven't tried it yet - the userConent.css tricks are doing fine for me, and let me block by size.
Peter
Post Reply