A Firefox extension that prevents YouTube from interrupting your viewing experience with the "Continue watching?" dialog. Perfect for music playlists, podcasts, long-form content, and ambient videos.
YouTube automatically pauses videos after a period of inactivity and displays a "Video paused. Continue watching?" prompt. This extension removes that interruption, allowing uninterrupted playback for legitimate use cases such as:
- 🎵 Music playlists and albums
- 🎙️ Podcasts and long-form content
- 🌙 Ambient videos (rain sounds, lo-fi, etc.)
- 📚 Educational content and lectures
- 🎮 Livestreams and VODs
Note: This extension does NOT block advertisements or interfere with YouTube's monetization. It only prevents the passive viewing timeout prompt.
- ✅ Automatic Dialog Removal - Three-layer defense system ensures the dialog never appears
- ✅ Mobile & Desktop Support - Works on both www.youtube.com and m.youtube.com
- ✅ Minimal Permissions - Only requests access to YouTube, nothing else
- ✅ Zero Data Collection - All processing happens locally, no tracking whatsoever
- ✅ Lightweight - Minimal CPU/memory footprint, won't slow down your browser
- ✅ Easy Toggle - Simple on/off switch in the popup
- ✅ Privacy First - No external connections, no telemetry, fully transparent
The extension uses a multi-layered approach for maximum reliability:
Instantly hides the dialog using targeted CSS rules before JavaScript even loads.
A MutationObserver watches for the dialog being inserted into the page and removes it immediately.
Periodically simulates minimal user activity (mouse movement event) every minute to reset YouTube's idle timer, preventing the dialog from triggering in the first place.
-
Download the Extension
- Download from Mozilla Add-ons (Recommended)
- Or clone this repository:
git clone https://github.com/LabinatorSolutions/youtube-uninterrupted.git cd youtube-uninterrupted -
Load as Temporary Add-on (for testing)
- Open Firefox
- Navigate to
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Select the
manifest.jsonfile from the extension folder - The extension will remain active until you restart Firefox
-
Permanent Installation (recommended)
- Create a Firefox Add-on Collection (see below)
- Or submit to Mozilla Add-ons (AMO) for public distribution
-
Create a Firefox Account (if you don't have one)
-
Create a Collection
- Visit https://addons.mozilla.org/firefox/collections/
- Click "Create a collection"
- Name it (e.g., "My Extensions")
- Note your User ID and Collection name
-
Add Extension to Collection
- You'll need to submit the extension to AMO first (even as unlisted)
- Or use a pre-published version
- Add it to your collection
-
Configure Firefox Android
- Open Firefox on Android
- Tap menu (⋮) → Settings → About Firefox
- Tap the Firefox logo 5 times to enable debug menu
- Go back to Settings → Custom Add-on collection
- Enter your User ID and Collection name
- Restart Firefox
- Go to Add-ons and install from your collection
- Install Firefox Nightly from Google Play Store
- Follow the same collection process as above
- Nightly allows more flexibility for testing
-
Navigate to YouTube
- Open any YouTube video (desktop or mobile)
-
Verify Extension is Active
- Click the extension icon in your toolbar
- You should see "Active on YouTube pages"
- The toggle should be ON (red)
-
Play a Video
- Start any video
- Let it play without interaction
- The "Continue watching?" dialog will never appear
-
Toggle On/Off
- Click the extension icon
- Use the toggle switch to enable/disable
- Status updates in real-time
Issue: Dialog still appears
Solutions:
-
Verify the extension is enabled
- Click the extension icon
- Ensure toggle is ON
-
Check if extension is active on current page
- Extension only works on
*.youtube.comdomains - Not in YouTube mobile app (apps don't support extensions)
- Extension only works on
-
Reload the YouTube page
- Press F5 or Ctrl+R (desktop)
- Pull down to refresh (mobile)
-
Check Firefox console for errors
- Press F12 → Console tab
- Look for errors starting with
[YouTube Continue]
Issue: Can't find the extension icon
Solutions:
-
Check if extension is installed
- Go to
about:addons - Look for "YouTube Uninterrupted"
- Go to
-
Pin the extension to toolbar
- Right-click toolbar → Customize Toolbar
- Drag extension icon to toolbar
Issue: Can't add extensions on Firefox Android
Solutions:
- Ensure you're using Firefox (not Chrome or other browsers)
- Firefox for Android requires custom collections (see installation)
- Use Firefox Nightly for easier development/testing
Issue: Dialog shows once when first opening YouTube
Why: The content script needs a moment to initialize
Solution: This is expected behavior. The dialog won't appear again during that session.
This extension is committed to your privacy:
- ✅ No Data Collection - We don't collect, store, or transmit any data
- ✅ No Tracking - No analytics, no telemetry, no cookies
- ✅ No External Connections - Extension works entirely offline
- ✅ Minimal Permissions - Only requests YouTube access
- ✅ Open Source - All code is public and auditable
- ✅ Local Processing - Everything happens in your browser
The extension requests:
| Permission | Purpose |
|---|---|
storage |
Save your on/off preference |
*://*.youtube.com/* |
Access YouTube pages to remove the dialog |
That's it. No access to browsing history, no access to other sites, no background data collection.
youtube-uninterrupted/
├── manifest.json # Extension configuration
├── content-scripts/
│ ├── youtube-uninterrupted.js # Main logic (3 layers)
│ └── inject-styles.css # CSS hiding layer
├── background/
│ └── service-worker.js # State management
├── popup/
│ ├── popup.html # Popup UI
│ ├── popup.js # Popup logic
│ └── popup.css # Popup styles
├── icon.svg # Extension icon (scalable)
└── README.md # This file
-
Clone Repository
git clone https://github.com/LabinatorSolutions/youtube-uninterrupted.git cd youtube-uninterrupted -
No Build Step Required
- This is a vanilla JavaScript extension
- No npm dependencies, no bundling needed
- Just load directly into Firefox
-
Testing
- Load as temporary add-on (see Installation)
- Open YouTube
- Check browser console for
[YouTube Continue]logs - Enable debug mode by editing
CONFIG.DEBUG = trueinyoutube-uninterrupted.js
- ✅ No External Dependencies - Vanilla JavaScript only
- ✅ Modern ES6+ - Clean, readable code
- ✅ Comprehensive Comments - Every function documented
- ✅ Error Handling - Try/catch blocks throughout
- ✅ Performance Optimized - Debouncing, minimal polling
- ✅ Cross-Browser Compatible - Works on Firefox Desktop & Android
The extension implements three defensive layers:
Layer 1: CSS Injection (inject-styles.css)
- Injected at
document_startfor instant effect - Uses
!importantflags to override YouTube's inline styles - Targets multiple selectors for resilience
Layer 2: DOM Monitoring (youtube-uninterrupted.js)
- MutationObserver watches for dialog insertion
- Debounced callbacks (100ms) for performance
- Multiple selector strategies for reliability
- Automatically removes or hides detected dialogs
Layer 3: Activity Simulation (youtube-uninterrupted.js)
- Dispatches mouse movement events every minute
- Resets YouTube's idle timer
- Prevents dialog from triggering in the first place
- Non-intrusive, doesn't interfere with actual user actions
- CPU Usage: Negligible (event-driven, no continuous polling)
- Memory Usage: < 1MB
- Network Impact: Zero (no external requests)
- Battery Impact: Minimal (optimized intervals)
| Platform | Minimum Version | Status |
|---|---|---|
| Firefox Desktop | 147.0 | Fully supported |
| Firefox Android | 147.0 | Fully supported |
| Firefox Nightly | Latest | Fully supported |
Contributions are welcome! Here's how you can help:
-
Report Bugs
- Open an issue with details
- Include Firefox version and OS
- Describe steps to reproduce
-
Suggest Features
- Open an issue with your idea
- Explain the use case
-
Submit Pull Requests
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit PR with clear description
- Keep it simple - no unnecessary dependencies
- Maintain vanilla JavaScript approach
- Comment your code thoroughly
- Test on both desktop and mobile
- Preserve privacy-first principles
GNU Affero General Public License v3.0
Copyright (c) 2026 YouTube Uninterrupted Contributors
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Developed by Labinator.
This extension is designed strictly to enhance the experience for valid users who are actively listening to or watching content but cannot interact with their device (e.g., while cooking, exercising, working, or sleeping).
Please use this tool responsibly. It is NOT intended to:
- Artificially inflate view counts or engagement metrics
- Abuse YouTube's bandwidth or server resources
- Circumvent policies when no user is actually present or consuming content
We strongly encourage users to respect the platform and its creators. If you are no longer consuming content, please pause the video or close the tab manually.
This extension is not affiliated with, endorsed by, or officially connected to YouTube, Google, or Mozilla. It is an independent project created for educational purposes and personal use.
The extension respects YouTube's terms of service by:
- Not blocking advertisements
- Not circumventing YouTube Premium features
- Not downloading or modifying video content
- Simply removing a UI element that interrupts playback
Use responsibly and in accordance with YouTube's Terms of Service.