
Loading…
How do I "whitelist" a youtube channel? #405
why is this not working?
@@||youtube.com^$document
$document is not supported in filters. To support what you wish here, the clean solution is to extend the syntax for whitelisting.
I don't like ABP's $document option, it is hacky, because it's a filter which is quite different from other filters: all other filters apply to each net request themselves. The $document option influence the outcome of future net requests, so really it should be part of the whitelist directives, not part of the filter set.
I will extend the whitelisting syntax such that to whitelist for the example you link to will be to use this line as a whitelist directive:
https://youtube.com/*&user=[PASTE THE USER NAME HERE]*
Nice! Great news.
You should add this to the wiki I'd say.
The feature is not released yet. I want to add more code to harden, and make the feature more friendly internally. For example, imagine adding a complicated whitelist directive -- like the one for Youtube above -- which could be removed by the a simple click on the big power button. I have in mind that when this happens, the directive will be commented out rather than being removed for directives which cannot be easily recreated from the popup UI.
Would it ever be possible to whitelist a youtube channel without external script, so it won't reload each page? Besides, it's the only reason I have tampermonkey installed.
It is possible without tampermonkey, I could do an extension. But I don't think it will be possible without a reload: First of all the page needs to be downloaded, to add the youtube username to the url. After that the reload is a must. uBlock checks the url, finds out it is on the whitelist and doesn't block ads. A whitelist-without-reload would only work if Youtube sent the username in the header, or in the ads' urls. (They didn't last time I've checked)
Actually I was thinking of parsing HTML text directly through uBlock
Oh yes, that'd be cool.
It's just the only solution I can come up with right now... :\
parsing HTML text directly through uBlock
There is no guarantee this won't require reload: there is no guarantee secondary resources are not trying to load before the HTML can be parsed. There is also that this is a rather ugly hack for a very specific case (Youtube). The real fix should be on Youtube's side -- to provide info in the URL about who uploaded a specific video.
A tiny improvement could be this:
- You open a youtube link
- You watch the video until it's over
- The script adds the username to the url, reloads the page, mutes the commercial and closes the tab after it's over
not the best.. but would be better than opening a link, letting it reload, watching the ad, watching the vid
Could I write @@||youtube.com^ ?
Could I write
@@||youtube.com^?
This would whitelist requests from youtube.com regardless of channel, not the same thing as whitelisting a specific youtube.com channel.
I'm trying to get this script to work: https://greasyfork.org/en/scripts/4168-youtube-whitelist-channels-in-adblock-plus
But I'm stuck with this fr*cking filter that just won't work no matter what I do.