Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Shop Rabbit

Hop between shopping sites from one right-click.

Right-click selected text on any page and search it on your shopping site of choice.

The menu shows two things at once: your live site as a direct entry, and a Search on… submenu directly below it holding every other site you've added.

Search on Skroutz
Search on…          ▸  BestPrice
                       AliExpress

Manage the list in the extension's settings. The submenu can be switched off there if you'd rather keep the single entry.

Address bar

Type shoprabbit in the address bar and press Space, then your search. Enter searches your live site; the other sites appear as suggestions you can pick. Chrome autocompletes the keyword, so a few letters + Tab gets you there too. It always follows whatever you've set as live — nothing is hardcoded.

Install (unpacked)

  1. Unzip this folder somewhere permanent — Chrome loads it from disk on every start, so don't leave it in Downloads and delete it later.
  2. Open chrome://extensions (or edge://extensions, brave://extensions, etc.).
  3. Turn on Developer mode (top right).
  4. Click Load unpacked and pick the extension folder — the one containing manifest.json.

Open settings by clicking the toolbar icon, or from the extension's card under Details → Extension options.

Adding sites

Run a search on the site you want, copy the resulting address, and replace your search words with %s. For example https://www.shopflix.gr/search?q=laptop becomes https://www.shopflix.gr/search?q=%s.

Pick your country in settings to load its top local shops (plus the always-on global marketplaces); the "start from one of these" chips offer the wider local field for that country as one-click adds. Every added site is editable if a shop ever changes its URL format.

Drag a row by its handle to reorder the submenu, or focus a handle and use the arrow keys. The live site keeps its place at the top of the menu regardless of list order.

Each site shows its favicon next to its name, read from Chrome's local cache — no outside request is made. Use Export list and Import list below your sites to back the list up as a JSON file or carry it to another browser. Importing merges: it adds sites that aren't already present and skips duplicates, so it never overwrites what you have.

Settings live in chrome.storage.sync, so they follow your Chrome profile across devices. The menu rebuilds automatically when settings change, including changes made on another machine.

Files

File Purpose
manifest.json Manifest V3 config. Permissions: contextMenus, storage, favicon.
background.js Service worker: builds the menu, opens tabs, handles the address-bar keyword.
shared.js Storage schema, presets, URL building and validation, country packs.
catalog.js Static shop catalog and country list feeding packFor() (data core for country packs).
i18n.js / _locales/ chrome.i18n helpers and the 12 localized message catalogs.
options.html / .css / .js Settings page.
tests/ shared.test.mjs — pure-logic unit tests (npm test); options.browser.test.mjs — Playwright options-page smoke test (npm run test:browser).
package.json Test scripts and the Playwright dev dependency. Not part of the shipped extension.
HANDOFF.md Project history, design decisions and open gaps.
icons/ 16/32/48/128px icons, plus the 512px masters they're scaled from.

Menu structure

buildMenu() creates the primary entry, then a parent item plus one child per remaining site. The parent and its children are skipped when the submenu is switched off, or when there's only one site — no empty "Search on…" left dangling.

Rebuilds are serialised through scheduleRebuild(). Two overlapping runs would interleave removeAll() with create(), every id would collide, and the menu would stay stuck on stale entries. Requests arriving mid-rebuild are coalesced into one extra pass.

Menu labels don't echo the selected text. Chrome substitutes %s in a title with the selection, which is why site names are still run through escapeTitle() — a name containing a literal %s would otherwise be replaced.

Notes

  • No host permissions and no content script. The extension never reads page content — Chrome hands it the selected text only when you click the menu item.
  • The selection is whitespace-collapsed and capped at 200 characters.
  • URLs are validated again at click time. Storage syncs between machines, so an entry may never have passed through this profile's validation.
  • chrome.storage.sync allows 8KB per key, which caps the list at roughly 50 sites. Failed writes roll the page back and say so rather than silently losing the change.
  • Removing a site shows an undo toast for 8 seconds, restoring it to its original position. If you remove the live site, the next one in the list takes over.
  • Removing every site is a real state — the list stays empty and the menu disappears.
  • The settings page uses system fonts only and makes no outside requests, and follows your system light or dark theme.
  • Search terms are encoded with encodeURIComponent, so spaces become %20. Every preset handles that; a site that insists on + would need its own encoding rule.
  • After editing any file, hit the reload arrow on the extension card.

Icon

Green shopping bag with the hop arcing over it. 48 and 128 carry the full mark; 32 and 16 drop the arc and show the bag alone, larger and bolder — the arc turns to mush below 48px. Both are scaled from the 512px masters in icons/. The green matches the --live accent on the settings page.

Not done

  • 12 languages are shipped — English, Greek, German, French, Italian, Spanish, Portuguese (Brazil), Polish, Turkish, Japanese, Korean, and Arabic (with right-to-left layout). The UI follows your browser's language, with English as the fallback.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages