YouTube - Remove Trending button

Hides the Trending button from YouTube

当前为 2021-03-22 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name YouTube - Remove Trending button
  3. // @description Hides the Trending button from YouTube
  4. // @version 2
  5. // @grant none
  6. // @include *://youtube.com/*
  7. // @include *://*.youtube.com/*
  8. // @author @sverigevader
  9. // @namespace https://greasyfork.org/users/692021
  10. // ==/UserScript==
  11.  
  12. window.setTimeout(
  13. function check() {
  14. if (document.querySelector('[title="Explore"]')) {
  15. main();
  16. }
  17. window.setTimeout(check, 250);
  18. }, 250
  19. );
  20.  
  21. function main() {
  22. var node = document.querySelector('[title="Explore"]');
  23. node.style.display = "none";
  24. }