Chrome Extension That Blocks Websites During Focus Hours

Block distracting websites on a schedule you set. With a one-click override for emergencies.

productivityintermediate#focus#blocking#productivity
PlugThis prompt
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

  1. Sign in to PlugThis and open the chat input.
  2. Copy the prompt above and paste it into the chat.
  3. PlugThis generates the full Manifest V3 extension in 60-90 seconds.
  4. Download the zip, extract it, and load it via chrome://extensions developer mode.

Related extensions

Build it now, free.

Paste the prompt above into PlugThis and ship your extension in 3 minutes.