- JavaScript 89.4%
- CSS 6.5%
- HTML 4.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| docs | ||
| icons | ||
| palette | ||
| .gitignore | ||
| .npmrc | ||
| background.js | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| palette.html | ||
| pnpm-lock.yaml | ||
| popup.css | ||
| popup.html | ||
| popup.js | ||
| README.md | ||
| web-ext-config.mjs | ||
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.
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:
↑/↓(orCtrl+N/Ctrl+P) to move,Enterto switch,Escto close,Tab/Shift+Tabto cycle. - Search when nothing matches: press
Enterto 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)
- Open Firefox and go to
about:debugging#/runtime/this-firefox. - Click Load Temporary Add-on….
- Select
manifest.jsonin 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:
- Click the Ctrl + Shift + Space field.
- Press the new combination. It must include Ctrl or Alt.
- 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 lintreports 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.
