Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Opt in Ads for specific Youtube channel
- // @description adds the uploader of the video to the URL so you can configure your AdblockPlus to whitelist certain channel you would like to support ----- to whitelist in AdblockPlus add a rule containing '@@|http*://www.youtube.com/watch*user=NAMEOFTHECHANNELHERE$document' (without quotation marks) ----- this is far from elegant but its a quick workaround
- // @namespace de.schippi
- // @include http*://www.youtube.com/watch*
- // @version 1
- // ==/UserScript==
- var u = window.location.href;
- if(u.search("user=") == -1){
- var cont = document.getElementById("watch7-user-header").innerHTML;
- var user=cont.match(/\/user\/.+?\"/i)[0].replace(/\/user\//i,'').replace(/\"/i,'');
- window.location = u+"&user="+user;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement