Twitch.tv (partial ad-blocking)

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
sylexzer
Posts: 2
Joined: Mon Feb 18, 2013 4:55 am

Twitch.tv (partial ad-blocking)

Post by sylexzer »

Hi everyone. 8)

I've been trying to figure out how to do a specific ad-blocking pattern with Adblock Plus for twitch.tv, a popular streaming website. Being that the people who stream there often make a living off of ad revenue, I choose to disable AdBlock Plus for streamers' channel pages. This is easy enough to do, even if you haven't read up on the filter syntax. However, there is a pesky hovering ad on another section of the website (http://www.twitch.tv/directory/following) that I would like to block and I can't seem to find a way to do this that isn't trumped by the filter exception used above.

To get into specifics, I'm using the standard filter exceptions rule for twitch.tv, along with one to block the specific add on /directory pages:

Code: Select all

@@http://www.twitch.tv/$document
|www.twitch.tv/directory/$document|##div[class="ad_contain nothidden"]
With the intention of not making this post cluttered by an oversized image, here's link to a screenshot highlighting the ad I would like to block: http://i.imgur.com/pEziKvQ.jpg. It's a div with class="ad_contain nothidden". Does anyone know a way to get this to work? It seems like it may be impossible given the way the filters work, but if you've got any ideas, I'd love to hear 'em! :D
User avatar
Crits
Posts: 394
Joined: Mon Jan 16, 2012 11:54 am
Location: France
Contact:

Re: Twitch.tv (partial ad-blocking)

Post by Crits »

Hi,

A few points about filtering:

1. An exception rule, in the cases where it applies, will aways override a blocking rule (or an element hiding rule).
In other words, because @@http://www.twitch.tv/$document will allow everything on all pages of twitch.tv, you won't be able to block anything on that website even if you add some very specific blocking rules.

2. |www.twitch.tv/directory/$document|##div[class="ad_contain nothidden"]
doesn't use a valid sytax (it's both an blocking rule and a hiding rule, albeit these are different things and cannot be put together).
This particular tutorial en/filter-cheatsheet may help you grasp the difference.

3. For what you want, the following filters may work:

Code: Select all

@@*$domain=twitch.tv
twitch.tv##.ad_contain
Author of Liste FR, an ad-blocking subscription for French websites
sylexzer
Posts: 2
Joined: Mon Feb 18, 2013 4:55 am

Re: Twitch.tv (partial ad-blocking)

Post by sylexzer »

Wow, thank you for the quick response and especially for a solution that worked. I had to tweak it slightly (add .nothidden after .ad_contain), but I really appreciate that you took the time to read and solve my problem. Have an awesome day! :mrgreen:
Locked