Forces YouTube autoplay toggle to be visible
This userscript ensures that the Autoplay toggle button on YouTube remains visible at all times by forcing its display via a CSS rule.
YouTube sometimes hides the Autoplay toggle depending on screen size, playback context, or internal UI updates. This script ensures the element with aria-label~="Autoplay" is always displayed.
[aria-label~="Autoplay"] to use display: inline !important.document-start) for maximum consistency.<style> element containing the CSS rule is injected into the document <head>.MutationObserver monitors DOM changes and ensures the CSS persists through YouTube's single-page navigation system.data-autoplay-fix attribute to prevent multiple injections.aria-label for the autoplay button (e.g., localizing it or renaming it), you may need to update the selector.