This repository is structured with shared code at the root and browser-specific files in subfolders.
- Lets you configure target URLs using wildcard patterns and regex.
- Shows a full-screen, non-dismissible timer modal when a configured site is opened.
- Blocks access until user enters a duration and starts the timer.
- Redirects the same tab to an extension page (
timeout.html) when time expires. - Lets you customize the timeout message.
- Wildcard:
https://example.com/* - Regex:
regex:^https://(www\\.)?youtube\\.com/.*$
- Shared code (root):
background.js,contentScript.js,contentStyles.css,options.*,timeout.* - Firefox-specific:
firefox/manifest.json - Firefox build helper:
firefox/scripts/build-firefox.sh
-
Open Firefox and go to
about:debugging. -
Click This Firefox.
-
Run:
./firefox/scripts/build-firefox.sh
-
Click Load Temporary Add-on....
-
Select
firefox/build/manifest.json. -
Open extension settings from
about:addonsto configure patterns and message.
firefox/manifest.json- Firefox extension manifest (MV2-compatible for broader Firefox support).background.js- Rule matching, session/timer state, and redirect logic.contentScript.js+contentStyles.css- Mandatory overlay UI injected into pages.options.html+options.js+options.css- Extension configuration UI.timeout.html+timeout.js+timeout.css- Post-timer redirect page.