#div(name) new function

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
sheepy
Posts: 147
Joined: Sat Jun 17, 2006 8:44 pm

Post by sheepy »

zeniko wrote:What about using XPath to...
Or, to attack it from another angle, there is a CSS3 selector (pseudo-class) called contains, e.g. E:contains("foo")

If it can be implemented in Firefox, then we have a simple solution.
Wladimir Palant

Post by Wladimir Palant »

Where did you see that selector? http://www.w3.org/TR/css3-selectors/ doesn't have it - and I doubt something like this will ever be added to CSS, CSS is always strictly unidirectional (for performance reasons).

Edit: I found an older revision of that spec that indeed had E:contains("foo") - but this selector was removed in later revisions of CSS3, and with a good reason IMO. Even this old revision had a comment "restricted to static media types" - this feature was never meant for implementation in browsers.
pavlo
Posts: 6
Joined: Tue Feb 12, 2008 9:52 am
Contact:

Post by pavlo »

sorry, div only hided elementes?
everything downloading all page and big traffic is stay?
User avatar
Adblock Plus Fan
Posts: 1255
Joined: Sat Feb 24, 2007 11:08 am

Post by Adblock Plus Fan »

pavlo wrote:sorry, div only hided elementes?
everything downloading all page and big traffic is stay?
Yes.
Images inside a hidden div is still downloaded.

If you want to stop the big traffic you must block the images with a normal filter before you hide the elements.
pavlo
Posts: 6
Joined: Tue Feb 12, 2008 9:52 am
Contact:

Post by pavlo »

and how i doing it?
User avatar
Adblock Plus Fan
Posts: 1255
Joined: Sat Feb 24, 2007 11:08 am

Post by Adblock Plus Fan »

pavlo wrote:and how i doing it?
If you have an image + div containing it:
First you do this to the image: http://adblockplus.org/en/faq_basics#blocking
Then you use Element Hiding Helper to hide the div.
pavlo
Posts: 6
Joined: Tue Feb 12, 2008 9:52 am
Contact:

Post by pavlo »

i'am not understand, it's function hide or cut images and div elements? If hide, then i'am not economy my traffic and it very bad :(
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

'Hiding' elements is not to stop traffic. 'Hiding' is for removing text ads in the html and removing spaces left over from 'blocked' items AFTER downloading them. Those rules remove elements on the USER's own computer.

You need to "block" traffic to stop traffic. The rules are different:
"Advertisement filters" = "blocked"
"Element hiding rules" = "hidden"

"Blocked" = not downloaded (no traffic)
"Hidden" = downloaded, but not visible (still causes traffic)
User avatar
Adblock Plus Fan
Posts: 1255
Joined: Sat Feb 24, 2007 11:08 am

Post by Adblock Plus Fan »

pavlo wrote:i'am not understand, it's function hide or cut images and div elements? If hide, then i'am not economy my traffic and it very bad :(
It's very simple. Adding to what Rick said:

This trick is "economy your traffic": http://img232.imageshack.us/img232/1204/36959539kg7.png

This trick is "not economy your traffic": http://img231.imageshack.us/img231/3034/64293334zn2.png
pavlo
Posts: 6
Joined: Tue Feb 12, 2008 9:52 am
Contact:

Post by pavlo »

Add block image, it's very very not it's convenient.
Blocking only image and it not always posible.
And also flash video and etc. :(
Div hiding very convenient, but not economy traffic :cry:
adum
Posts: 131
Joined: Fri Jun 09, 2006 7:39 pm

Post by adum »

pavlo wrote:Add block image, it's very very not it's convenient.
Blocking only image and it not always posible.
And also flash video and etc. :(
Div hiding very convenient, but not economy traffic :cry:
Adblock image is only an example; you can block images, flash, gifs, java, .. even some javascript functions, but the filters cannot always be selected using context menu (i.e. flash videos control the context menu when you hover the mouse over them). But you can always open the Blockabe items window: when visiting a page, press Ctrl + Shift + B and it will appear a window with the complete list of the items that can be blocked; press one of them and the filters window will be opened with a filter suggestion.

Other kind of ads, like some javascript seudopopups (very usual in P2P and porn pages) and Google ads are "html text ads", which you cannot block but hide using CSS rules. Anyway, they use very little bandwith.
Locked