No description
Find a file
2026-04-06 12:46:20 -07:00
icons initial commit 2026-04-06 12:46:20 -07:00
background.js initial commit 2026-04-06 12:46:20 -07:00
firefox-focus initial commit 2026-04-06 12:46:20 -07:00
home.css initial commit 2026-04-06 12:46:20 -07:00
home.html initial commit 2026-04-06 12:46:20 -07:00
home.js initial commit 2026-04-06 12:46:20 -07:00
manifest.json initial commit 2026-04-06 12:46:20 -07:00
options.css initial commit 2026-04-06 12:46:20 -07:00
options.html initial commit 2026-04-06 12:46:20 -07:00
options.js initial commit 2026-04-06 12:46:20 -07:00
popup.css initial commit 2026-04-06 12:46:20 -07:00
popup.html initial commit 2026-04-06 12:46:20 -07:00
popup.js initial commit 2026-04-06 12:46:20 -07:00
README.md initial commit 2026-04-06 12:46:20 -07:00
spec.md initial commit 2026-04-06 12:46:20 -07:00
theme.css initial commit 2026-04-06 12:46:20 -07:00

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-focus launches Firefox with a dedicated profile at ~/.mozilla/firefox/focus-mode.profile.
  • By default, firefox-focus launches firefox-devedition, not stock Firefox.
  • Running firefox-focus example.com or firefox-focus "search terms" opens that target in the Focus profile.
  • Running firefox-focus --kiosk example.com starts 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 a user.js with privacy-focused defaults, and writes chrome/userChrome.css to 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.css tweaks.
  • 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

  1. Open about:debugging#/runtime/this-firefox.
  2. Choose Load Temporary Add-on.
  3. Select manifest.json.