Combined Element Blocking/Generic

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

Combined Element Blocking/Generic

Post by Paulfox »

Wladimir Palant wrote:Not possible to use regexps with element hiding. Element hiding is only another way to write CSS. So you could for example add a number of filters:
yahoo.com#div(H4)
yahoo.com#div(nwad)

Or, if you really can't live without smashing hundred rules into one (which gives you absolutely
no performance improvement whatsoever) you can use raw CSS:
yahoo.com## div#H4, div#nwad, div#yredmods
I already have one that's effective as GENERIC non-site specfic:
#div(ad_box)

So to combine using CSS into one term along w/ #div(ad_box), NOT for optimization as just "organization in one generic catch - all filter):
#sponsor, #sponsors, .sponsor, .sponsors

It would be:
## div(ad_box), #sponsor, #sponsors, #.sponsor, #.sponsors
(??)

Otherwise I'm assuming separate entries would be:
#div(ad_box)
#sponsor
#sponsors
#.sponsor
#.sponsors

What I'm doing in meantime til I get answer: Stylish script/userContent based on Zoocar9's script plus my "addition." There will no doubt be others such as perhaps ".bottomad, .leftad, #leftad, .promo, #promo," et cetera.

.ad_box, #sponsor, #sponsors, .sponsor, .sponsors { display: none !important; }

Works great - if AB+ blocked elements, I'd prefer it - but since we're talking about "hiding" in both instances, it seems AB+ should be used for blocking and userContent for "appearance and/or hiding of elements." Just a personal opinion. I'm wondering which might be faster - content or AdBlock Plus - in managing "generic" element blocks.
Guest

Post by Guest »

The problem is: inbound elements (no matter if text, picture, script) cannot be blocked without loading the whole page. Even proxys and firewalls must load the whole page, because they need to know what to block.

You cannot ask the server: "Please send me the html. And skip the ads please." :wink:
The filter needs to know what is necessary block, so he needs the (whole) file first, after that he can decide what to block and what not. This is simply a technical issue.
Paulfox

Post by Paulfox »

OK . . . thanks.
#div(ad_box) did (does) work - I'm afraid of false positives on rest of them. But apparently "send me and skip the ads" at least works with that filter I mention - or at least "send me the html and my browser won't display them."

If we're only talking about not displaying, rather than blocking, I'm sorta convinced that userContent is the way to go anyway - that's reason for the post.

Thank you very much indeed for your response.
User avatar
pirlouy
Posts: 332
Joined: Sat Jun 10, 2006 2:33 pm
Location: France

Post by pirlouy »

Paulfox wrote:If we're only talking about not displaying, rather than blocking, I'm sorta convinced that userContent is the way to go anyway - that's reason for the post.
One asset of AB+ is the fact that you're not obliged to restart the browser.

For example, I use:
mozillazine.org#*(sidebar)
If i want to see the sidebar in order to do a search, I just disable this filter and update page.

But yes, this is not user-friendly because there's no elements list like for images, scripts, objects... Maybe one day someone will create an extension which can modify page very quickly (a mix of DOM inspector, AB...)
ecjs
Posts: 170
Joined: Sun Jun 11, 2006 7:39 pm

ecjs

Post by ecjs »

We may share our element hiding filters.

For guidetv.wanadoo.fr :
wanadoo.fr#*(bg_pub)
wanadoo.fr#div(sl)
Guest

Post by Guest »

what happend to

Code: Select all

/\((ad_box|sponsors?)\)/


works just might fucking fine for me.
Paulfox

Post by Paulfox »

Anonymous wrote:what happend to

Code: Select all

/\((ad_box|sponsors?)\)/


works just might *censored* fine for me.
I'm talking about div elements being hidden. Again, WP said:
Not possible to use regexps with element hiding.
And believe me, if anyone would like to regex divs or anything else, it's me. It might work "*censored*" fine, but it won't block "*censored*" divs.

Sometimes I hear the voices . . . . whoop! Little school bus is here, time for the helmet.
Wladimir Palant

Post by Wladimir Palant »

Paulfox, you are mixing apples with oranges here (maybe you noticed already, so just to be sure). There is CSS with its syntax rules and there is element hiding that defines an own syntax (that can include CSS but doesn't have to). Check out http://adblockplus.mozdev.org/filters.h ... hide_basic

The element hiding rule #div(ad_box) is equivalent to the CSS selector div.ad_box, div#adbox - or in terms of element hiding again:

Code: Select all

## div.ad_box, div#adbox
And the other way round: the rule ## #sponsor, .sponsor is the same as:

Code: Select all

#*(sponsor)
Aiden

not sure

Post by Aiden »

[spam removed]
Locked