Youtube large figuccio

menu guida autorestringe

当前为 2023-04-22 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Youtube large figuccio
  3. // @description menu guida autorestringe
  4. // @namespace https://greasyfork.org/users/237458
  5. // @version 0.6
  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-start
  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){return;}evita errore triangolo giallo
  26. var $ = window.jQuery;
  27. $(document).ready(function() {
  28. (function() {
  29. setTimeout(function(){
  30. let guide_button = document.getElementById ('guide-button');
  31. if (!guide_button)
  32. {return;}
  33. let tmp = guide_button.getElementsByTagName ('button');
  34. if (!tmp.length)
  35. {return;}
  36. tmp = tmp [0];
  37. if (!tmp.hasAttribute ('aria-pressed'))
  38. {return;}
  39. if (tmp.attributes ['aria-pressed'].value == 'true')
  40. guide_button.click ();}, 1000);
  41. })();
  42. });