Youtube - Whitelist by Channel

Whitelist Youtube Videos from only channels you wish to support

  1. // ==UserScript==
  2. // @name Youtube - Whitelist by Channel
  3. // @namespace schippi (modified by AcasShows)
  4. // @include http*://*.youtube.com/watch*
  5. // @include http*://youtube.com/watch*
  6. // @description Whitelist Youtube Videos from only channels you wish to support
  7. // @version 1.1
  8. // ==/UserScript==
  9. var u = window.location.href;
  10. if(u.search("user=") == -1){
  11. if (!! document.getElementById("ud")) {
  12. var user = document.getElementById("ud").getElementsByTagName("a")[0].getAttribute("href").split("/")[2];
  13. window.location.href = u+"&user="+user;
  14. }
  15. else if (!! document.getElementById("body")) {
  16. user = document.getElementById("watch7-user-header").getElementsByTagName("a")[0].getAttribute("href").split("/")[2]
  17. window.location.href = u+"&user="+user;
  18. }
  19. else {
  20. alert('script failed');
  21. }
  22. }