YouTube Hide Controls When Paused

Hides YouTube controls when paused unless hovering

  1. // ==UserScript==
  2. // @name YouTube Hide Controls When Paused
  3. // @namespace https://youtube.com/
  4. // @version 1.0
  5. // @description Hides YouTube controls when paused unless hovering
  6. // @author ChatGPT
  7. // @match *://www.youtube.com/*
  8. // @grant GM_addStyle
  9. // ==/UserScript==
  10.  
  11. (function () {
  12. 'use strict';
  13.  
  14. GM_addStyle(`
  15. /* Hide controls when paused and not hovered */
  16. .html5-video-player.paused:not(:hover) .ytp-chrome-bottom,
  17. .html5-video-player.paused:not(:hover) .ytp-gradient-bottom {
  18. opacity: 0 !important;
  19. pointer-events: none !important;
  20. transition: opacity 0.3s ease-in-out;
  21. }
  22.  
  23. /* Show controls on hover */
  24. .html5-video-player.paused:hover .ytp-chrome-bottom,
  25. .html5-video-player.paused:hover .ytp-gradient-bottom {
  26. opacity: 1 !important;
  27. pointer-events: auto !important;
  28. }
  29. `);
  30. })();