Youtube large figuccio

menu guida autorestringe

目前为 2022-02-08 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Youtube large figuccio
  3. // @description menu guida autorestringe
  4. // @namespace https://greasyfork.org/users/237458
  5. // @version 0.5
  6. // @match https://www.youtube.com/*
  7. // @author figuccio
  8. // @grant GM_addStyle
  9. // @grant GM_setValue
  10. // @grant GM_getValue
  11. // @run-at document-idle
  12. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
  13. // @icon https://www.youtube.com/s/desktop/3748dff5/img/favicon_48.png
  14. // @license MIT
  15. // ==/UserScript==
  16. //pulsante guide- button (hide "guide" menu)
  17. /*
  18. $(document).ready(function() {
  19. (function() {
  20. setTimeout(function(){
  21. document.querySelector("#guide-button").click();}, 1000);
  22. })();
  23. });
  24. */
  25. /////////////////pulsante guide- button (hide "guide" menu)
  26. $(document).ready(function() {
  27. (function() {
  28. setTimeout(function(){
  29. let guide_button = document.getElementById ('guide-button');
  30. if (!guide_button)
  31. return;
  32. let tmp = guide_button.getElementsByTagName ('button');
  33. if (!tmp.length)
  34. return;
  35. tmp = tmp [0];
  36. if (!tmp.hasAttribute ('aria-pressed'))
  37. return;
  38. if (tmp.attributes ['aria-pressed'].value == 'true')
  39. guide_button.click ();}, 1000);
  40. })();
  41. });