MozillaZine

Phoenix image/banner ad blocking extensions?

Talk about add-ons and extension development.
alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted December 15th, 2002, 3:49 pm

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

Stefan

User avatar
 
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post Posted December 15th, 2002, 6:19 pm

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

alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted December 15th, 2002, 6:22 pm

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"]

Stefan

User avatar
 
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post Posted December 15th, 2002, 6:36 pm

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

Post Posted December 16th, 2002, 6:39 am

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

Post Posted December 17th, 2002, 11:24 am

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

Post Posted December 17th, 2002, 11:35 am

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?

alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted December 17th, 2002, 11:53 am

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.

alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted December 17th, 2002, 11:56 am

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 Posted January 4th, 2003, 6:57 am

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

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 3 guests