rayanbfvr / uBlock Origin - Whitelist Youtube Channels

Hi, nice work.
Unfortunately this script doesn't seem to be working since i switched to Youtube's new Design (youtube.com/new).

From what i can tell, the problem is that the 'data-ytid' which you are using in your script isn't present anymore in the new design, so we probably need another way to extract the channel-ID.

Would really appreciate if you'd try to fix it.

Hi dabeste,

I haven't paid attention to the script for a while but I took a look recently and realized there's now no way to acquire the channel ID in the DOM.
Thus, the only way I found to get the channel ID is to use the Youtube API. Unfortunately, that means you'll have to setup a project on the developer console and grab a key, which isn't a difficult process but might be intimidating for regular users. On the bright side, that means that the script isn't DOM-bound anymore so any future changes to the layout shouldn't break the script (in theory). It will even be possible to whitelist videos that are clicked from outside Youtube (ex: a link from Reddit). I'll enable that in a future update.

Beware that right now, AJAX is broken on video links, which mean that every time you click on a video, it loads the whole website all over again. This is related to the new layout but I haven't found a solution yet since this is a change in the Javascript code, not just the DOM.

I'll be glad to hear what you think about that new version.