Browser extension
The Hotaru extension (SI-570) finds the feeds on the page you’re looking at and follows them in your Hotaru. It works with any Hotaru: you give it the address and an API token. One codebase in apps/extension builds the Chrome and the Firefox extension, both Manifest V3, with WXT and Svelte. Every API call goes through @hotaru/sdk, like the other clients (api.md).
It only finds and follows feeds. It doesn’t read items, count unread ones, notify, share or save pages: those belong in the app or in Raindrop.
Build and install
pnpm build:extension # apps/extension/.output/chrome-mv3 and firefox-mv3pnpm --filter @hotaru/extension zip # the same as .zip files, for a store or for sharingzip makes hotaru-<version>-chrome.zip, hotaru-<version>-firefox.zip and, for addons.mozilla.org, hotaru-<version>-sources.zip with the extension, the SDK and the workspace’s root files. A reviewer rebuilds the Firefox zip from it byte for byte with the steps in apps/extension/REVIEW.md.
- Chrome, Edge, Brave: open
chrome://extensions, turn on Developer mode, Load unpacked, pickapps/extension/.output/chrome-mv3. - Firefox (140 or newer): open
about:debugging#/runtime/this-firefox, Load Temporary Add-on, pickmanifest.jsoninapps/extension/.output/firefox-mv3. A temporary add-on is gone after a restart; to keep it, sign the zip at addons.mozilla.org (unlisted is enough).
pnpm --filter @hotaru/extension dev (and dev:firefox) rebuild on every change into .output/chrome-mv3-dev; load that folder the same way. Safari is out of scope: it needs an Xcode wrapper and a paid developer account.
Set up
Installing opens the settings (also: the gear in the popup, or the extension’s Options).
- Address of your Hotaru, such as
https://hotaru.example.com. Over plainhttpthe settings warn, unless it’s this machine. - API token from Settings → API tokens in the web app, or
pnpm user tokenon the server (auth.md). Make it Read and follow feeds (subscribe): it reads, finds feeds and follows them, and can’t change or delete anything else. Awritetoken works too. The settings say so when the token can’t follow. - Save. The browser asks for access to your Hotaru’s host, and the extension calls
/api/v1/meto show who you’re connected as. Test connection does the same without saving.
Both are kept in storage.local, never storage.sync, so the token stays on this computer.
Use
- The popup (the toolbar icon, or Alt+Shift+H; change the shortcut in
chrome://extensions/shortcutsor Firefox’s add-on settings) lists the feeds at the page’s address with their kind, number of items and the date of the last post. A feed without a post for half a year is marked, so a dead one stands out. Give it a name and tags (your existing tags are suggested) and Follow. Feeds you follow already say Following, with Open in Hotaru, which opens that source’s editor on the Sources page (/sources?edit=<subscription id>). - The server finds the feeds: the list comes from
POST /api/v1/sources/discover, so YouTube channels, moved feeds and the guessed paths (/feed,/rss…) work exactly as in the app. When the server finds nothing at the address (a page behind a login, say), the extension tries the feeds the page announces in<link rel="alternate">. When nothing works, the popup shows the server’s reason. - A feed file open in the tab (
.xml,.json) is found as itself, marked This page. - Right-click a link → Subscribe in Hotaru opens the popup for that link in a small window, for the “RSS” links in page footers.
- The count on the icon shows how many feeds a page announces. It needs no network call.
Permissions
| Permission | When | Why |
|---|---|---|
activeTab, scripting |
Install (no warning) | Reads the page’s <link> elements, only when you click the icon or press the shortcut. |
storage, contextMenus |
Install (no warning) | The settings; the link menu. |
| Your Hotaru’s host | When you save or test the settings | Calls the API from the background. With the host permission it isn’t subject to CORS, so the server needs no CORS change. |
All sites (<all_urls>) |
Only if you turn on Feed count | Counts the feeds on every page as it loads. Turning it off gives the permission back. |
Without the opt-in the count appears when you open the popup. Match patterns can’t hold a port, so a local Hotaru on localhost:5173 asks for all of localhost.
Firefox shows one data-collection notice: opening the popup sends the page’s address to the Hotaru server you set up (browsingActivity). Nothing goes anywhere else. The privacy policy for the store listings is hotaru.rocks/privacy.
How it’s built
| File | What it does |
|---|---|
src/entrypoints/background.ts |
The only place that calls the API; the context menu; the count. Keeps no state between events. |
src/entrypoints/popup/ |
The popup, also opened as a window with ?url= by the context menu. |
src/entrypoints/options/ |
The settings and the permission requests. |
src/entrypoints/badge.ts |
The counting script, registered on every page only with the opt-in (lib/badge.ts). |
src/lib/api.ts |
Each request through @hotaru/sdk, answered as { ok, value } or { ok: false, message }: errors don’t survive runtime messaging. |
src/lib/messages.ts |
The messages between the pages and the background. |
Tests: pnpm --filter @hotaru/extension test runs the unit tests and builds both extensions to check their manifests (Manifest V3, no host or content script at install). apps/web/e2e/extension.e2e.ts loads the Chrome build into Chromium against the real server: settings, the connection test, the server’s answer, and following a feed with a name and tags.