3.3 KiB
Firefox Focus Mode
Firefox Focus Mode is a Firefox WebExtension prototype inspired by the iOS and Android Firefox Focus app. It narrows the browsing model down to a single surviving tab, a custom home page with four bookmark tiles, a quick control popup, and a one-tap session wipe.
Included
- Collapses extra tabs and windows back into one active tab
- Replaces the Firefox new-tab page with a Focus-style home page
- Sets Firefox's homepage/new-window page and new-tab page to the Focus-style home page
- Stores and shows up to four bookmarks
- Clears browsing data and returns to the home page
- Exposes back, forward, refresh, home, trash, settings, and URL entry from the toolbar popup
- TODO: Blocks common tracker URLs by default, with optional ad, analytics, and social blocking
Suggested profile setup
Use a secondary Firefox profile for this extension so the single-tab and session-clearing behavior only affects your Focus-style profile.
Launcher script
A companion launcher lives at ./firefox-focus.
- Running
firefox-focuslaunches Firefox with a dedicated profile at~/.mozilla/firefox/focus-mode.profile. - By default,
firefox-focuslaunchesfirefox-devedition, not stock Firefox. - Running
firefox-focus example.comorfirefox-focus "search terms"opens that target in the Focus profile. - Running
firefox-focus --kiosk example.comstarts the same profile in Firefox kiosk mode. - The launcher writes a packaged add-on file into the profile at
extensions/firefox-focus-mode@hunner.dev.xpi, writes auser.jswith privacy-focused defaults, and writeschrome/userChrome.cssto hide the bookmarks bar and tab strip in that dedicated profile.
By default firefox-focus opens a regular Firefox window for that dedicated profile. That is expected: the extension can replace the new-tab page and add its own controls, but it cannot remove Firefox's native chrome on its own. Use firefox-focus --kiosk ... if you want the stricter fullscreen shell.
If you move this repo later, update FIREFOX_FOCUS_EXTENSION_DIR or edit the script so the profile still points at the right checkout.
Depending on your Firefox build, automatic loading of the local .xpi may still be limited by Mozilla's add-on signing rules. If that happens, the profile styling changes from firefox-focus will still apply, but the extension itself may still need temporary loading or signing.
On standard release Firefox builds, this is the expected limitation. The most reliable persistent-install paths are:
- use a signed
.xpi - use a Firefox channel intended for extension development, such as Developer Edition or Nightly
Important Firefox limits
- Extensions cannot force all browsing into Firefox private windows. This prototype clears browsing data on browser startup and via the trash action, which gets close to the intended behavior without true permanent private mode.
- Extensions cannot remove Firefox's built-in tab strip, address bar, or standard browser buttons. For a stricter kiosk-like shell, pair this extension with a dedicated profile and optional
userChrome.csstweaks. - Firefox does not let extensions manage other installed extensions with a whitelist, so that part of the spec is intentionally left out.
Loading the extension for manual testing
- Open
about:debugging#/runtime/this-firefox. - Choose
Load Temporary Add-on. - Select
manifest.json.