A Chrome extension that blocks access to popular social media sites to help improve productivity and focus. PS: My first extension :)
No Doom is a browser extension designed to block distracting social media websites. When blocking is enabled, attempts to visit blocked sites will redirect users to a blocked page instead, helping maintain focus during work or study sessions.
- Toggle Blocking: Easy on/off switch via popup interface
- Multiple Platform Support: Blocks major social media platforms including:
- X (formerly Twitter)
- TikTok
- YouTube
- Persistent Settings: Blocking state is saved and restored across browser sessions
- Clean Interface: Simple popup with toggle button
- Immediate Effect: Changes take effect immediately without requiring page refresh
- Newer version is coming soon (current version link: https://chromewebstore.google.com/detail/mfokcfcclncbcoofbapojlnhmmcmhgig?utm_source=item-share-cb)
- Click the No Doom icon in your browser toolbar
- Use the toggle button to enable or disable blocking
- When blocking is enabled, visiting blocked sites will show a blocked page
- When blocking is disabled, all sites function normally
The extension uses Chrome's Manifest V3 architecture with:
- Service Worker:
background.jshandles the core blocking logic - Declarative Net Request API: Efficiently blocks network requests to social media domains
- Web Navigation API: Handles redirects for blocked sites
- Storage API: Persists user preferences
nodoom/
├── manifest.json # Extension configuration
├── background.js # Service worker with blocking logic
├── popup.html # Extension popup interface
├── popup.js # Popup functionality
├── blocked.html # Page shown when sites are blocked
├── icon.png # Extension icon
└── README.md # This file
The extension requires the following permissions:
declarativeNetRequest: Block network requests to social media sitesdeclarativeNetRequestWithHostAccess: Access to modify requests for specified hostsstorage: Save user preferencestabs: Update tab URLs when redirectingwebNavigation: Monitor navigation events for blocking
To block additional websites, modify the URLS_TO_BLOCK array in background.js:
const URLS_TO_BLOCK = [
// Add new patterns here
"*://*.example.com/*"
];Also add corresponding host permissions to manifest.json:
"host_permissions": [
"*://*.example.com/*"
]The extension currently blocks main frame requests only. To modify this behavior, edit the resourceTypes in the createRules() function within background.js.
- Chrome browser (version 88 or higher for Manifest V3 support)
- Basic knowledge of JavaScript and Chrome Extension APIs
- Load the extension in developer mode
- Test blocking functionality by visiting blocked sites
- Verify toggle functionality works correctly
- Check that settings persist across browser restarts
This extension doesn't require a build process. All files can be loaded directly into Chrome as an unpacked extension.
- 1.1.0: Current version with full blocking functionality
- Support for major social media platforms
- Toggle interface for easy control
- Persistent settings storage
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source. Please check the repository for license details.
For issues or feature requests, please create an issue in the project repository.
This extension:
- Does not collect or transmit any personal data
- Only stores blocking preferences locally
- Does not track browsing history
- Functions entirely offline after installation