YouTube Hide "Recommended for you" from related videos

Hides videos marked as "Recommended for you" from the related videos on YouTube video pages.

  1. // ==UserScript==
  2. // @name YouTube Hide "Recommended for you" from related videos
  3. // @namespace http://mathemaniac.org/
  4. // @version 1.0.2
  5. // @description Hides videos marked as "Recommended for you" from the related videos on YouTube video pages.
  6. // @include http://youtube.com/watch*
  7. // @include http://www.youtube.com/watch*
  8. // @include https://youtube.com/watch*
  9. // @include https://www.youtube.com/watch*
  10. // @grant none
  11. // @copyright 2013-2016, Sebastian Paaske Tørholm
  12. // @require http://code.jquery.com/jquery-latest.min.js
  13. // ==/UserScript==
  14.  
  15. function hideRecommended() {
  16. $('#watch-related li').each( function () {
  17. if ($("span:contains('Recommended for you')", this).length > 0) {
  18. $(this).remove();
  19. }
  20. });
  21. $(document).one('DOMNodeInserted', '#watch-related', hideRecommended);
  22. }
  23.  
  24. hideRecommended();