YouTube - whitelist channels in uBlock Origin

To whitelist YouTube channels in uBlock Origin

< YouTube - whitelist channels in uBlock Originについてのフィードバック

レート:可 - スクリプトは動作するがバグがある

§
投稿日: 2017/10/08
編集日: 2017/10/08

Reloading prohibits most video ads!

The page-reloading habit of this script prevents most video ads from playing at all... This script would need to be made to parse YouTube constantly and update the link when the user is clicks it. Considering using Adblock's functionality and using it just on YouTube.

Also the instructions in the code are a bit unclear, i made it work with channel ids by changing

var link = document.querySelector('[id="watch7-user-header"] a[href^="/user/"]');
    if ( link === null ) {
        link = document.querySelector('[id="watch7-user-header"] a[href^="/channel/"]');
        if ( link === null)
            return;

to

var link = document.querySelector('[id="watch7-user-header"] a[href^="/channel/"]');
if ( link === null ) {
link = document.querySelector('[id="watch7-user-header"] a[href^="/channel/"]');
if ( link === null)
return;

Using it with channel ids since it is easy to pull them from www.youtube.com/subscription_manager

edited to remove the youtube preview from above link since apparrently someone (@greasyfork) really wants it inline....

§
投稿日: 2017/10/08
編集日: 2017/10/08

Perhaps something from here would help: https://greasyforks.org/fi/forum/discussion/7954/x

Tried this with uBlock, but naturally it doesn't work with it. The script modifies the URL without reloading, but uBlock still blocks everything!

§
投稿日: 2017/10/08

Ditch that... Everything one would ever need is here: https://greasyforks.org/en/scripts/9932-youtube

返信を投稿

返信を投稿するにはログインしてください

长期地址
遇到问题?请前往 GitHub 提 Issues。