Greasy Fork is available in English.
Prevents videos from pausing when the tab/window loses visibility or focus. Spoofs Page Visibility API, blocks lifecycle events, and auto-resumes videos paused by the site.
☕ If you find this tool helpful & would like to support its maintenance, please consider leaving a tip on:
Thank you! :-)
Prevents videos from pausing when you switch tabs, minimize the browser, or the window loses focus. Works on Instagram, Facebook, Reddit, and TikTok.
Modern web apps aggressively pause media the moment you leave the tab:
visibilitychangeThis script spoofs visibility state, blocks lifecycle events, and auto-resumes videos paused by the site—not by you.
document.hidden always return falsedocument.visibilityState always return "visible"webkit-prefixed propertiesvisibilitychange, pagehide, pageshow, freeze, resume from reaching site scriptsfocus/blur events (some sites pause on blur instead)play() to resumeMutationObserver to catch dynamically loaded videos (all these sites are single-page apps)blockFocusBlurEvents in the config if needed.All options are in the CONFIG object at the top of the script:
| Option | Default | Description |
|---|---|---|
spoofVisibilityAPI |
true |
Spoof document.hidden / visibilityState |
blockVisibilityEvents |
true |
Block visibility/lifecycle events |
blockFocusBlurEvents |
true |
Block focus/blur events |
autoResumeVideos |
true |
Auto-resume videos paused by the site |
userGestureGraceMs |
1500 |
Time (ms) after a gesture to treat pause as intentional |
debug |
false |
Enable console logging |
instagram.comfacebook.comreddit.comtiktok.com| Problem | Solution |
|---|---|
| Video still pauses | Enable debug: true and check console for clues |
| Site features broken | Try disabling blockFocusBlurEvents |
| Doesn't work on mobile | Browser/OS-level restrictions; not fixable via userscript |