YouTube View More Uploader Videos

See a sleek list of additional videos from the same user that have been uploaded from within your video player.

当前为 2015-04-04 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name YouTube View More Uploader Videos
  3. // @namespace YVMUV
  4. // @description See a sleek list of additional videos from the same user that have been uploaded from within your video player.
  5. // @version 02.07.13.0147
  6. // @include http://www.youtube.com/*
  7. // @include https://www.youtube.com/*
  8. // @author drhouse
  9. // ==/UserScript==
  10.  
  11. var theurl = document.URL;
  12. var links = document.getElementById('body-container').getElementsByTagName('a');
  13.  
  14. if (location.href.toString().indexOf("list") == -1 && parent.location.href.toString().indexOf("watch") != -1 && parent.location.href.toString().indexOf("feed") == -1 && parent.location.href.toString().indexOf("watch_") == -1)
  15. window.location.href = (theurl + "&list=UL");
  16.  
  17. for(var i=0 ; i<links.length ; i++){
  18. if (links[i].href.toString().indexOf("watch") != -1 && links[i].href.toString().indexOf("list") <= -1 && links[i].href.toString().indexOf("feed") == -1 && links[i].href.toString().indexOf("watch_") == -1)
  19. links[i].setAttribute('href', links[i].getAttribute('href').split('&')[0] + '&list=UL');
  20. }