No description
  • JavaScript 89.4%
  • CSS 6.5%
  • HTML 4.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-22 18:40:57 +03:00
docs init 2026-10-22 18:29:07 +03:00
icons init 2026-10-22 18:29:07 +03:00
palette fix issues found by deepseek 4.1 2026-10-22 18:36:41 +03:00
.gitignore init 2026-10-22 18:29:07 +03:00
.npmrc init 2026-10-22 18:29:07 +03:00
background.js fix issues found by deepseek 4.1 2026-10-22 18:36:41 +03:00
manifest.json change gecko.id in manifest 2026-10-22 18:40:57 +03:00
package-lock.json init 2026-10-22 18:29:07 +03:00
package.json init 2026-10-22 18:29:07 +03:00
palette.html init 2026-10-22 18:29:07 +03:00
pnpm-lock.yaml init 2026-10-22 18:29:07 +03:00
popup.css init 2026-10-22 18:29:07 +03:00
popup.html init 2026-10-22 18:29:07 +03:00
popup.js init 2026-10-22 18:29:07 +03:00
README.md init 2026-10-22 18:29:07 +03:00
web-ext-config.mjs init 2026-10-22 18:29:07 +03:00

Tab Palette

A Firefox extension that lets you jump between open tabs with a keyboard-driven command palette. Press the shortcut, start typing, and hit Enter — no mouse needed.

Tab Palette preview

Features

  • Fuzzy search across tab titles, hostnames, URLs, and title initials (gh → GitHub, mwd → MDN Web Docs).
  • Command palette UI injected into the current page as an overlay (Shadow DOM, so page styles can't interfere).
  • Keyboard-first: ↑/↓ (or Ctrl+N/Ctrl+P) to move, Enter to switch, Esc to close, Tab/Shift+Tab to cycle.
  • Search when nothing matches: press Enter to open the query in a new tab — a URL is opened directly, anything else goes through your default search engine.
  • Every window: by default tabs from all Firefox windows are included. The current tab and tabs in other windows are labelled.
  • Recently used first when the search box is empty.
  • Configurable shortcut directly in the toolbar popup, plus a link to Firefox's own shortcut manager.
  • Fallback window for pages where extensions may not run (about:, add-ons site, PDF viewer, …).
  • Works with light and dark themes.

Install (development / temporary)

  1. Open Firefox and go to about:debugging#/runtime/this-firefox.
  2. Click Load Temporary Add-on….
  3. Select manifest.json in this directory.

The extension stays installed until Firefox is restarted. To load it again, repeat the steps.

Alternatively, with Node.js installed:

npm install
npm run start

Usage

  • Press Ctrl+Shift+Space to open the palette.
  • Type part of a tab title, a domain, or initials. Every space-separated word must match.
  • Press Enter to switch to the highlighted tab. If it lives in another window, that window is focused.
  • If no tabs match, press Enter to open the query in a new tab. Domain-like queries open as URLs; anything else becomes a search using Firefox's default search engine.
  • Press Esc to close the palette and return to the page.

Changing the shortcut

Open the extension's toolbar popup:

  1. Click the Ctrl + Shift + Space field.
  2. Press the new combination. It must include Ctrl or Alt.
  3. Press Backspace to clear the shortcut, Esc to cancel.

Reset restores Ctrl+Shift+Space. Firefox shortcuts opens the browser's Manage Extension Shortcuts page, which is useful if a combination is reserved by Firefox.

Some combinations (Ctrl+T, Ctrl+W, Ctrl+Shift+P, …) are handled by Firefox before extensions see them, so they will not work. Firefox may also reject a shortcut already used by another extension; the popup reports when that happens.

Notes and limitations

  • Firefox does not allow content scripts on privileged pages such as about:config, about:addons, addons.mozilla.org, or the built-in PDF viewer. There the palette opens as a small popup window instead. The fallback window also appears if injection fails for any other reason.
  • The popup shortcut editor uses browser.commands.update(). The manifest requires Firefox 140+ because of the data-collection declaration and Firefox's shortcut-settings API. If the API is unavailable, the popup falls back to opening Firefox's shortcut manager instead.
  • Permissions: tabs (read titles/URLs), storage (settings), scripting + activeTab (inject the overlay only when you invoke the extension). No broad <all_urls> host access.
  • The shortcut is stored by Firefox per profile.
  • This is a desktop extension. Firefox for Android doesn't support keyboard commands, so it isn't targeted; web-ext lint reports one expected Android minimum-version warning for the manifest's data-collection declaration.

Project layout

manifest.json          Manifest V3, command definition, permissions
background.js          Command handling, overlay injection, tab listing/switching
palette.html           Standalone palette window (fallback)
palette/styles.js      Shared CSS (injected into a shadow root)
palette/search.js      Fuzzy matching / URL formatting (pure functions)
palette/palette.js     Palette UI and keyboard handling
popup.html/css/js      Toolbar popup: shortcut editor + settings
icons/                 Extension icons
package.json           npm scripts (build / lint / start) and the web-ext dev dependency
web-ext-config.mjs     Files excluded from the packaged extension

Development

npm install

# Build a zip for signing / distribution -> dist/tab_palette-1.0.0.zip
npm run build

# Validate the extension
npm run lint

# Run in Firefox with automatic reload
npm run start

The first npm run build creates the dist/ directory. npm ci works too, using the committed package-lock.json.

To install permanently outside development mode, package the extension and submit it to addons.mozilla.org for signing, or use Firefox Developer Edition / Nightly with xpinstall.signatures.required disabled.