A lightweight Firefox extension that automatically focuses the Amazon search field when you land on a supported Amazon homepage.
This is intended as a fast, privacy-friendly workflow: minimal UI, no backend, and no data sent anywhere.
- Automatically focuses the search field on supported Amazon homepage URLs
- Popup toggle to turn auto-focus
ON/OFFwithout disabling the extension - Does not auto-focus on product pages or other non-homepage routes
- Press
Escapewhile the search field is focused to blur it - Avoids stealing focus if you are already interacting with another input
- Retries briefly after page load because Amazon often renders the header late
When you open a supported Amazon homepage, the extension:
- Waits for the page header and search input to appear
- Focuses the search field if nothing else is already focused
- Lets you dismiss focus by pressing
Escape
This means you can start typing immediately without clicking into the search box first.
- Click the extension toolbar button to open the popup
- Use the toggle switch to set the feature to
ONorOFF - The state is saved and applied across tabs/sessions
- The button badge shows current state (
ONorOFF)
- Open Firefox
- Go to:
about:debugging#/runtime/this-firefox
- Click Load Temporary Add-on...
- Select the
manifest.jsonfile in this project
Open a supported Amazon homepage and the search field will be focused automatically.
The content script:
- Runs on the supported Amazon domains listed in the manifest
- Checks whether the current page is a root storefront URL such as
/or/ref=... - Looks for Amazon's search input in the page header
- Focuses it only if another meaningful element is not already focused
- Listens for
Escapeso the focused search field can be blurred quickly
All processing happens locally in the browser.
- It only runs on the supported
www.amazon.*domains listed in the manifest - Amazon frequently changes its DOM and header structure
- Some locale or layout changes may require selector updates in the content script
When Amazon changes its layout, selectors or homepage heuristics may need updating.
- Firefox
web-ext lint --source-dir .
web-ext build --source-dir . --overwrite-dest
The build output is generated at web-ext-artifacts/amazon_search_focus-1.0.3.zip.
Amazon-Search-Focus/
├─ manifest.json
├─ background.js
├─ content-script.js
├─ popup.html
├─ popup.css
├─ popup.js
├─ icon.png
├─ icon-48.png
├─ icon-96.png
├─ icon-128.png
├─ LICENSE
└─ README.md
This project is released under the Unlicense. See LICENSE.