⚖️ This project is All Rights Reserved.
You may view the code, but you may not copy, modify, reuse, or redistribute it.
A clean, privacy-friendly browser extension for blocking distracting websites using simple patterns or regular expressions.
Simple Site Blocker helps you stay focused by instantly redirecting blocked sites to a friendly, dark-mode-optimized reminder page.
It stores no data outside your browser and never makes network requests — everything runs 100% locally.
- Block any site using simple text patterns
- Redirects to a custom dark-mode “blocked” page
- Live preview showing what each pattern will match
- Regex support via the
re:prefix - Import / Export your block list
- Auto-updates rules in real time as you edit
- Zero defaults — you choose exactly what to block
- Private, offline, and fast
Simple Site Blocker uses the browser’s
Declarative Net Request (DNR) engine to intercept page loads.
If a URL matches one of your patterns:
- The request is redirected to
blocked.html - You see a friendly “You blocked this site” reminder
- A single click opens your block list for editing
No network calls, no scripts injected into websites, and no background polling.
Open:
Settings → Extensions → Simple Site Blocker → Extension options
Then enter one pattern per line.
Blocks any URL containing this domain:
example.com
Blocks any URL containing the text:
example
Use the prefix re::
re:^https?://(www\.)?example\.net/.*
Changes take effect instantly.
news
social
gaming
helloWorld.com
re:^https://(www\.)?example\.net/.*
Sometimes browsers reuse cached pages, which bypass blocking momentarily.
Try:
- Refresh the page
- Open the site in a new window
- Clear that site’s cookies/cache
- Wait a moment — DNR rules apply asynchronously on startup
- No analytics
- No tracking
- No external network calls
- No remote servers
- All data is stored locally
- Only minimal permissions are required
simple-site-blocker/
│
├── manifest.json
├── LICENSE
├── README.md
│
├── assets/
│ ├── icon16.png
│ ├── icon48.png
│ ├── icon128.png
│ └── simple-site-blocker.svg
│
├── pages/
│ ├── blocked.html
│ ├── options.html
│ └── popup.html
│
└── src/
├── background.js
├── blocked.js
├── options.js
└── popup.js
- Download or clone this repository
- Open your browser’s extensions page
- Edge:
edge://extensions - Chrome:
chrome://extensions
- Edge:
- Enable Developer Mode
- Click Load unpacked
- Select the extension folder
Feel free to open an issue if you have suggestions or ideas.
This project aims to stay simple, elegant, and fully user-controlled.