A Chrome extension that blocks Amazon, Amazon Business and everything Amazon owns for a number of days or weeks you choose. It is deliberately hard to switch off, but never impossible.
No accounts, no servers, no tracking. Everything stays in your browser.
- Blocks every Amazon storefront in every country (amazon.com, .co.uk, .de, .fr, .es, .it, .ca, .co.jp, .in, .com.au and 22 more), including every subdomain: Amazon Business, Fresh, Music, Kindle, Alexa, Photos, Pay, Smile and the rest. Short links such as
amzn.toanda.coare covered too. - Blocks what Amazon owns, each group with its own switch: Prime Video, MGM+ and Wondery, Audible, Twitch, IMDb and Goodreads, Zappos, Shopbop, Woot, AbeBooks, Whole Foods, Ring, Blink and eero.
- Commitments. Pick 1 week, 2 weeks, 1 month, 3 months or any custom length up to a year. The toolbar badge shows which day you are on, and the dashboard keeps score of every attempt it turned away.
- A blocked page worth landing on. Instead of a browser error you get a calm page with your progress, a short line to think about, and a way back.
- Emergency access that costs something. It exists for the day you really do need to cancel a subscription or find a receipt. Getting there takes three steps and a forced sixty second pause, the window closes on its own, and it is recorded as a slip on your commitment.
- Light and dark, following your system setting.
The extension is not on the Chrome Web Store. You load it straight from this folder, which takes about a minute.
-
Get the code. Either clone it:
git clone https://github.com/DJProspero1/off-amazon.git
or use Code → Download ZIP on GitHub and unzip it somewhere permanent. Chrome loads the extension from that folder every time it starts, so do not delete or move it afterwards.
-
Open Chrome and go to
chrome://extensions. -
Turn on Developer mode with the switch in the top right corner.
-
Click Load unpacked and choose the folder that contains
manifest.json. -
Amazon is blocked from this moment. A welcome page opens where you can pick how long you are staying away.
Optional: click the puzzle piece icon in the toolbar and pin Off Amazon so you can see the day counter.
The same steps work in Edge (edge://extensions), Brave (brave://extensions), Arc, Vivaldi and any other Chromium browser.
Pull or download the new version into the same folder, then open chrome://extensions and click the reload icon on the Off Amazon card. Your commitment and history are kept.
Open chrome://extensions and click Remove on the Off Amazon card. That deletes the stored commitment and history as well. If you only want a break from the block, use the emergency flow instead, so the record stays intact.
Click the toolbar icon. It shows the current day of your commitment, how many attempts were blocked and how many slips you have taken. Before you have chosen a commitment it offers the presets right there.
Right click the icon and choose Options, or click Open dashboard anywhere. The dashboard is where you:
- choose or extend a commitment,
- toggle the optional groups (Prime Video, Audible, Twitch and so on),
- allow AWS if you need the console for work,
- see the history of finished commitments,
- start the emergency flow.
Blocking is on from the moment you install. A commitment adds a finish line and a counter. Pick a preset or type a custom number of days or weeks, up to 365 days. When it ends the block stays on, and you can extend, start a new one, or switch off with a single confirmation. Nothing nags you.
The quiet I have an emergency link sits at the bottom of the popup and of the blocked page. It leads to a three step flow:
- Are you sure? You see where you are in the commitment and pick what you need: 15 minutes, 1 hour, or ending the commitment altogether.
- Take a minute. A sixty second counter you cannot skip. Most urges are gone before it reaches zero. The bright button on every step is the one that keeps blocking.
- Say it in your own hand. Type the sentence
I choose to break my commitment. Pasting is disabled.
A timed window lifts the block for exactly that long and then puts it back by itself, whether or not you remember. The popup shows the countdown and a button to close the window early. Every window is recorded as a slip on the commitment and in your history.
Ending the commitment moves it to history as "ended early" and turns blocking off until you turn it back on.
This is a Chrome extension, not a parental control. Anyone can remove or disable it from chrome://extensions, use another browser, or use the Amazon app on a phone. The design goal is friction and a clear moment of choice, not a lock. If you need a real lock, pair it with a DNS level blocker or a supervised profile.
The extension makes no network requests of its own. It asks for three permissions:
| Permission | Why |
|---|---|
declarativeNetRequest |
The blocking itself. Chrome applies the rules; the extension never sees your traffic. |
storage |
Your commitment, settings, counters and history, kept in chrome.storage.local. |
alarms |
To wake up when an emergency window or a commitment ends. |
Host permissions are listed for the blocked domains only, because Chrome requires them to redirect a request to the blocked page. There is no <all_urls>.
Every domain lives in lib/domains.js. Add a domain to CORE_DOMAINS or to one of the groups, then regenerate the manifest so the host permission is included:
node scripts/build-manifest.mjsReload the extension in chrome://extensions. Subdomains are always included, so example.com also covers shop.example.com.
The cooldown length, the confirmation phrase and the emergency window lengths are constants at the top of lib/state.js: COOLDOWN_SECONDS, CONFIRM_PHRASE and EMERGENCY_WINDOWS. The blocked page lines are in lib/format.js.
All colours, type and spacing are CSS custom properties at the top of shared.css. The light theme overrides them under prefers-color-scheme: light.
background.jsis a Manifest V3 service worker. It watches the stored state and turns it into dynamicdeclarativeNetRequestrules. When the state says "blocking", each rule redirects main frame and iframe navigations toblocked.html, carrying the original URL in the fragment. When an emergency window is open or blocking is off, the rules are removed. Alarms bring the block back when a window expires.lib/state.jsholds the whole state model and the pure functions that change it. Pages never touch network rules; they update state and the worker reacts.lib/rules.jsbuilds the rules. An optional allow rule with higher priority carves AWS back out of theamazon.comblock.popup.html,blocked.htmlanddashboard.htmlare plain HTML with ES modules and no dependencies.
manifest.json generated by scripts/build-manifest.mjs
background.js service worker
popup.html / .css / .js toolbar popup
blocked.html / … page shown instead of Amazon
dashboard.html / … options page: commitment, groups, history, emergency flow
shared.css design tokens and shared components
lib/domains.js every blocked domain, grouped
lib/state.js state model and mutations
lib/rules.js state → declarativeNetRequest rules
lib/format.js, lib/ui.js helpers
icons/ toolbar icons (regenerate with scripts/make-icons.ps1)
test/ unit tests and a Playwright end to end run
Requirements: Node 20 or newer. Nothing needs installing to run the extension itself.
npm test # unit tests for the state and rule logic
npm run build:manifest # regenerate manifest.json from lib/domains.js
npm run icons # regenerate icons (Windows PowerShell, uses System.Drawing)The end to end test loads the extension into a real Chromium, proves that Amazon navigations land on the blocked page, runs the commitment and emergency flows, and refreshes the screenshots in docs/screenshots:
npm i -D playwright
npx playwright install chromium
npm run e2eEdit files, then click reload on the extension card in chrome://extensions. Popup and dashboard changes show up on the next open; service worker changes need the reload.
Issues and pull requests are welcome. Useful contributions: domains that are missing, better copy for the blocked page, translations, and Firefox support (Firefox implements declarativeNetRequest, but redirecting to an extension page needs testing there).




