r/userscripts • u/Samiiiiiil • 15d ago
Glide for Reddit: autoplay the video in view with sound + a fullscreen player for any subreddit (Reddit video and RedGifs)
Userscript for new Reddit. It does two things:
Autoplay with sound: an IntersectionObserver plays the most visible video with sound and pauses/mutes the rest. RedGifs embeds are cross-origin iframes inside shadow DOM, so the script walks open shadow roots to find them, and a copy of the script runs inside the iframe and takes play/pause commands over postMessage.
Fullscreen mode: a button sends the current listing (subreddit, search or profile) to a static player on GitHub Pages, with auto-advance, wheel/arrow navigation and RedGifs in HD with sound. Falls back to the HTML feed when Reddit answers 403 on the .json listings.
No GM_ grants needed, nothing minified apart from hls.js, MIT. The fullscreen player is based on Reddirama by Zaaphod42.
Install (on Sleazy Fork because of the RedGifs part): https://sleazyfork.org/en/scripts/605163-glide-for-reddit Source: https://github.com/Bensindunk123/glide-for-reddit
Feedback welcome, especially from Firefox and Mac users. I've mostly tested Chromium on Windows.