Youtube - Remove Recommended

Remove recommended videoes from youtube

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

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