Youtube Remove Recommended

Script that removes the "Recommended" section on youtube main page

  1. // ==UserScript==
  2. // @name Youtube Remove Recommended
  3. // @namespace http://nothing.net
  4. // @version 0.1
  5. // @description Script that removes the "Recommended" section on youtube main page
  6. // @author ctcrnitv
  7. // @match https://www.youtube.com/
  8. // @grant none
  9. // ==/UserScript==
  10. 'use strict';
  11.  
  12. // Your code here...
  13.  
  14. (function main() {
  15. var targetSection = "Recommended";
  16. var sections = document.getElementsByClassName("branded-page-module-title-text");
  17.  
  18. for(var i = 0; i < sections.length; i++) {
  19. if(sections[i].innerHTML === targetSection) {
  20. sections[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.display = "none";
  21. }
  22. }
  23. }());