Chrome Extension That Blocks Websites During Focus Hours
Block distracting websites on a schedule you set. With a one-click override for emergencies.
Build a Chrome extension called "Focus Mode" that blocks user-specified websites during user-specified focus hours. The extension should: (1) provide an options page where the user adds website URLs to a blocklist (e.g., twitter.com, reddit.com, youtube.com) and sets focus hours (start time and end time, with day-of-week selection), (2) when a blocked URL is visited during focus hours, redirect to a custom "focus" page within the extension that shows the user's top goal for the day (which they set on the options page) plus a 60-second timer they can use to override the block if they really need to access the site, (3) save all settings in chrome.storage.local. Permissions: storage, declarativeNetRequest, declarativeNetRequestFeedback, tabs. Use Manifest V3 with declarativeNetRequest for blocking and a service worker for time-based logic.
What this extension does
Blocks user-specified distracting websites during user-specified focus hours. When the user tries to visit a blocked site during focus hours, they see a custom focus page with their stated goal and a 60-second override timer.
How it works
Uses Manifest V3 declarativeNetRequest API to block URLs at the network level. The service worker checks the current time against user-defined focus hours and dynamically updates the rule set. The override flow uses a temporary rule exception with an expiry.
Permissions used: storage, declarativeNetRequest, declarativeNetRequestFeedback, tabs
Who builds this
For knowledge workers, students, and writers who want to block themselves from procrastination sites during deep work hours, but still need a reasonable escape hatch for genuine emergencies.
How to build it in 3 minutes
- Sign in to PlugThis and open the chat input.
- Copy the prompt above and paste it into the chat.
- PlugThis generates the full Manifest V3 extension in 60-90 seconds.
- Download the zip, extract it, and load it via
chrome://extensionsdeveloper mode.
Related extensions
Chrome Extension That Combines Pomodoro Timer with Site Blocking
A Pomodoro timer that automatically blocks distracting sites during focus intervals.
Chrome Extension That Suspends Inactive Tabs to Save Memory
Automatically suspend tabs you haven't used in N minutes. Free up memory without losing your tabs.
Build it now, free.
Paste the prompt above into PlugThis and ship your extension in 3 minutes.