Block distracting websites when you are browsing the web. Use for procrastination.
See the codeBlock distracting websites when you are browsing the web. Written using WebExtensions so it will be compatible with the future releases of Firefox.
Recommended: install Impulse Blocker from the official Firefox Add-ons listing.
Simple usage guide can be found here.
If you want to build the extension yourself using the source code, follow these steps.
Make sure you have Node.js 24.x installed on your machine. This repository includes an .nvmrc file so version managers such as fnm and nvm can switch to the tested version automatically.
Then clone this repository:
git clone https://github.com/raicem/impulse-blocker.git
Then install the dependencies using npm
npm install
If you want to build it to sideload the extension without using the Mozilla's AMO use this command.
npm run release
This will create a zip file in the web-ext-artifacts folder. This file contains everything the Firefox needs to run the extension. You can install it following instructions here and here.
Again, you can install the extension from the official Firefox Add-ons page. Simple usage instructions are here.
This extension uses Webpack, Babel, and CSS loaders to generate the files in extension/dist, so Mozilla reviewers need the source code package as well as the built extension package.
Build environment requirements:
24.x; install it from nodejs.org or use a version manager such as nvm or fnm with the included .nvmrc.To create the source code package for Mozilla reviewers:
npm install
npm run source
This creates web-ext-artifacts/impulse-blocker-<version>-source.zip. Upload that ZIP as the source code package in AMO.
To rebuild the submitted extension package from that source package:
npm install
npm run release
This rebuilds the extension files with Webpack and creates the installable extension ZIP in web-ext-artifacts.
The extension is open for any kinds of contribution. Please note that it requires a basic knowledge about WebExtensions API and React.
After following the steps explained in the Building section above, all you have to do is run these commands in parallel.
npm run watch will start the Webpack watcher. This will immediately build the extension and create files to be loaded into the Firefox.
npm run browser will load the built files into the isolated Firefox instance and you will be able to see the changes you make immediately.
To also open Firefox's browser console and extension developer tools, run npm run browser:debug instead.
Run the unit tests with:
npm test
Run the automated Firefox extension smoke test with:
npm run test:e2e
The end-to-end test builds the extension, launches an isolated headless Firefox
profile, installs the extension temporarily, and checks its options page and
persisted settings, then verifies blocking behavior against a local test
server. Firefox must be installed. On a failure, diagnostics are written under
test-results/e2e-firefox. Selenium Manager may download GeckoDriver the first
time the test runs.
npm run browser remains the interactive development command; it does not
finish on its own or report a test result.
Make sure you run through these steps to make sure the extension works.
Impulse Blocker testing
Huge thanks to contributors!
JavaScript
89.8%
CSS
9.2%
Block distracting websites when you are browsing the web. Use for procrastination.
See the codeBlock distracting websites when you are browsing the web. Written using WebExtensions so it will be compatible with the future releases of Firefox.
Recommended: install Impulse Blocker from the official Firefox Add-ons listing.
Simple usage guide can be found here.
If you want to build the extension yourself using the source code, follow these steps.
Make sure you have Node.js 24.x installed on your machine. This repository includes an .nvmrc file so version managers such as fnm and nvm can switch to the tested version automatically.
Then clone this repository:
git clone https://github.com/raicem/impulse-blocker.git
Then install the dependencies using npm
npm install
If you want to build it to sideload the extension without using the Mozilla's AMO use this command.
npm run release
This will create a zip file in the web-ext-artifacts folder. This file contains everything the Firefox needs to run the extension. You can install it following instructions here and here.
Again, you can install the extension from the official Firefox Add-ons page. Simple usage instructions are here.
This extension uses Webpack, Babel, and CSS loaders to generate the files in extension/dist, so Mozilla reviewers need the source code package as well as the built extension package.
Build environment requirements:
24.x; install it from nodejs.org or use a version manager such as nvm or fnm with the included .nvmrc.To create the source code package for Mozilla reviewers:
npm install
npm run source
This creates web-ext-artifacts/impulse-blocker-<version>-source.zip. Upload that ZIP as the source code package in AMO.
To rebuild the submitted extension package from that source package:
npm install
npm run release
This rebuilds the extension files with Webpack and creates the installable extension ZIP in web-ext-artifacts.
The extension is open for any kinds of contribution. Please note that it requires a basic knowledge about WebExtensions API and React.
After following the steps explained in the Building section above, all you have to do is run these commands in parallel.
npm run watch will start the Webpack watcher. This will immediately build the extension and create files to be loaded into the Firefox.
npm run browser will load the built files into the isolated Firefox instance and you will be able to see the changes you make immediately.
To also open Firefox's browser console and extension developer tools, run npm run browser:debug instead.
Run the unit tests with:
npm test
Run the automated Firefox extension smoke test with:
npm run test:e2e
The end-to-end test builds the extension, launches an isolated headless Firefox
profile, installs the extension temporarily, and checks its options page and
persisted settings, then verifies blocking behavior against a local test
server. Firefox must be installed. On a failure, diagnostics are written under
test-results/e2e-firefox. Selenium Manager may download GeckoDriver the first
time the test runs.
npm run browser remains the interactive development command; it does not
finish on its own or report a test result.
Make sure you run through these steps to make sure the extension works.
Impulse Blocker testing
Huge thanks to contributors!
JavaScript
89.8%
CSS
9.2%