Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        Opt in Ads for specific Youtube channel
  3. // @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
  4. // @namespace   de.schippi
  5. // @include     http*://www.youtube.com/watch*
  6. // @version     1
  7. // ==/UserScript==
  8.  
  9.  
  10. var u = window.location.href;
  11. if(u.search("user=") == -1){
  12.     var cont = document.getElementById("watch7-user-header").innerHTML;
  13.     var user=cont.match(/\/user\/.+?\"/i)[0].replace(/\/user\//i,'').replace(/\"/i,'');
  14.     window.location = u+"&user="+user;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement