Youtube - Remove Recommended

Remove recommended videoes from youtube

当前为 2016-08-14 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Youtube - Remove Recommended
  3. // @namespace youtube-remove-recommended
  4. // @include *youtube.com/
  5. // @include *youtube.com/index?ytsession*
  6. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
  7. // @version 1.01
  8. // @grant none
  9. // @description Remove recommended videoes from youtube
  10. // ==/UserScript==
  11.  
  12. var filters = [
  13. "Recommended video",
  14. "Recommended channel for you"
  15. ];
  16.  
  17. $.each(filters, function( i, val ){
  18. $('li>div.feed-item-container:contains('+ val +')').remove();
  19. });
  20.  
  21.  
  22. (function() {
  23. var origOpen = XMLHttpRequest.prototype.open;
  24. XMLHttpRequest.prototype.open = function() {
  25. this.addEventListener('load', function() {
  26. setTimeout(function(){
  27. $.each(filters, function( i, val ){
  28. $('li>div.feed-item-container:contains('+ val +')').remove();
  29. });
  30. }, 200);
  31. });
  32. origOpen.apply(this, arguments);
  33. };
  34. })();