A web extension to delay loading of certain distracting websites
CSS changes to websites. Use Stylus instead.
Clone this repo, then follow instructions on how to load local extensions on Chrome and Firefox1.
Run pnpm install to load browser-polyfill. src/browser-polyfill.js just symlinks to the node-modules dist folder. If you need to recreate these symlinks, use absolute paths, ie
ln -sf ~/projects/breathe/node_modules/webextension-polyfill/dist/browser-polyfill.js ~/projects/breathe/src/browser-polyfill.js
There are three main branches:
mainfor common codefirefoxchrome
main does not have a manifest as firefox is on manifest v2 and chrome is on v3. So
- develop on the branch corresponding to the browser you're testing on. Commit browser-specific changes into the browser branch.
- switch to the
mainbranch to commit shared changes - rebase onto main in the browser branch
Update the version in the manifest.json
npx web-ext build
Add websites you'd rather not waste your time on to manifest.json's matches item (using wildcards if you'd like to ignore entire domains), then reload the extension.
Head to background.js and permit.js and change the timeMultiplier to 0.1 to speed everything up.
- Head to reddit.com to make sure the overlay shows up
- If it's your cheat day, you should still see the splash screen every 25 minutes or every new site
- You'll need to use Firefox Developer Edition to keep the extension installed permanently. Then visit about:config and change
xpinstall.signatures.requiredto false and download the zip from the releases page.
-
Don't allow cheat day if it's between midnight and 6
-
Ship with better default sites (facebook, instagram, TikTok)
-
Simplify the form
- Hide the 5 minute helper if used
- Hide the gif once the continue button is ready
-
Bug: x.com matches vox.com. Make sure that it can handle any protocol or subdomain but not be too eager
-
If I walk off while the breathe animation is going for a few minutes, show a button to start the countdown again
-
Dark theme for settings
hn.algolia.com
news.google.com
news.ycombinator.com
pinboard.in/popular
reddit.com
theoldreader.com
theoldreader.com
twitter.com
https://x.com
hn.algolia.com/?query=
news.ycombinator.com/item
reddit.com/message
reddit.com/r/*/comments
twitter.com/*/status
x.com/*/status
This is an anti-procrastination tool that takes a softer approach than most site blocking addons. Those don't work because you eventually just uninstall or disable them to continue your guilty pleasure. Rather than blocking you, this extension slows you down before you can visit time-wasting websites like Twitter, Facebook, Instagram, or Reddit.
When you try to visit one, it asks you how long you'd like to browse it for. Then you must wait 20 seconds before you can gain access. This helps break the dopamine loop associated with easily visiting these websites multiple times a day. When the time you defined is up, the tab closes.
Go to settings to set websites you don't want to visit, like: https://x.com
If you still want to be able to see certain pages of that website (say someone sends you a tweet), you can whitelist them with wildcards, like this: https://x.com/*/status
This extension is designed to help you focus by delaying the loading of certain websites.
Stores a list of URLs configured by the user to block/allow websites.
The user configures how long they would like to spend on a site. After that delay, the tab is closed. The alarms API is needed to trigger the event after the specified delay.
The extension needs to be able to block certain websites whenever the URL changes which must use the history popstate API inside a content script loaded into every page.