The Website Blocker is a browser extension designed to block specified websites. Users can add websites to a block list, and when they attempt to visit these sites, they will be redirected to a blocked page. Users can also request temporary unblocking of a site by providing a reason and a password.
- Block websites by adding them to a block list.
- Redirect blocked websites to a custom blocked page.
- Request temporary unblocking of a site with a reason and password.
- Configurable unblock duration.
- Clone the repository to your local machine.
- Open your browser and navigate to the extensions page (e.g.,
chrome://extensions/
for Chrome). - Enable "Developer mode" if it is not already enabled.
- Click on "Load unpacked" and select the directory where you cloned the repository.
- Click on the extension icon in the browser toolbar.
- Click the "Block This Site" button to add the current site to the block list.
- When you visit a blocked site, you will be redirected to a blocked page.
- Click the "Like to unblock?" button.
- Fill out the form with a reason and password, and select the duration for which you want to unblock the site.
- Submit the form to request temporary unblocking.
popup/popup.js
: Handles adding sites to the block list.blocked.js
: Handles the unblock request form on the blocked page.popup/popup.html
: HTML for the popup that allows users to block sites.blocked.html
: HTML for the blocked page with the unblock request form.manifest.json
: Configuration file for the browser extension.
The extension requires the following permissions:
storage
: To store the list of blocked sites.activeTab
: To get the URL of the active tab.webRequest
,webRequestBlocking
: To intercept and block requests to specified sites.<all_urls>
: To allow blocking of any URL.
This project is licensed under the MIT License.