Greasy Fork镜像 支持简体中文。

Youtube Hide Control

Automatically hide youtube control bar when paused

  1. // ==UserScript==
  2. // @name Youtube Hide Control
  3. // @version 0.1
  4. // @namespace https://github.com/TheFantasticWarrior
  5. // @description Automatically hide youtube control bar when paused
  6. // @author TFW
  7. // @match https://*.youtube.com/watch?v=*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. var timer;
  13. document.addEventListener('mousemove', function(){
  14. if(document.getElementsByClassName("html5-video-player")[0].classList.contains("ytp-autohide")){
  15. document.getElementsByClassName("html5-video-player")[0].classList.remove("ytp-autohide");
  16. }
  17. clearTimeout(timer);
  18. timer = setTimeout(noAction, 1000);
  19. });
  20.  
  21. function noAction(){
  22. if(!document.getElementsByClassName("html5-video-player")[0].classList.contains("ytp-autohide")){
  23. document.getElementsByClassName("html5-video-player")[0].classList.add("ytp-autohide");
  24. }
  25. }
  26. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址