Firefox WebExtension that lets you share the current tab to frontpage.fyi with minimal effort.
1## frontpage.fyi Firefox extension
2
3This repository provides a Firefox WebExtension that lets you share the current tab to [frontpage.fyi](https://frontpage.fyi) with minimal effort.
4Links are submitted by creating `fyi.frontpage.feed.post` records on your ATProto account, the same mechanism the official Frontpage site uses.
5
6> ℹ️ This repository is hosted on [tangled](https://tangled.org/@galiglobal.com/frontpage_firefox_plugin) (PRs, issues) and [GitHub](https://github.com/antonmry/frontpage_firefox_plugin) (CI/CD, releases).
7
8### Features
9
10- Pop-up form that auto-fills the active tab’s title and URL.
11- Title length indicator (120 characters, matching the Frontpage UI).
12- Background service worker handles ATProto login, token refresh, and record creation.
13- Options page for storing your handle, app password, and optional PDS override.
14- Convenience links to open frontpage.fyi or the options page from the pop-up.
15
16### Prerequisites
17
18- An ATProto account that Frontpage can read.
19- An app password for that account (create one at <https://bsky.app/settings/app-passwords> or via your own PDS).
20
21### Install a packaged build
22
231. Visit the [Releases](https://github.com/antonmry/frontpage_firefox_plugin/releases) page and download the latest `frontpage-submitter-<version>.xpi` (signed) or `.zip` (unsigned) asset.
242. In Firefox, open `about:addons`, click the gear icon, and choose **Install Add-on From File…**.
253. Select the downloaded `.xpi` (preferred) or `.zip` to complete the installation and approve the permissions prompt.
26
27### Configure credentials
28
291. Open the add-on pop-up and press the gear icon (or use `about:addons` → **Preferences**).
302. Enter your handle and app password. Supply a PDS URL only if you run a custom server.
313. Click **Save credentials**. A success message confirms that the session tokens are stored locally.
324. Use **Log out** at any time to remove stored tokens (you can also revoke the app password server-side).
33
34### Submit a link
35
361. Browse to the page you want to share.
372. Open the Frontpage pop-up; the title and URL are pre-filled.
383. Adjust the text if necessary and click **Post to Frontpage**.
394. On success, the pop-up reports the record URI returned by `com.atproto.repo.createRecord`.
40
41### Implementation notes
42
43- The background worker discovers the user’s PDS by resolving the handle (`com.atproto.identity.resolveHandle` + PLC lookup).
44- Sessions are refreshed automatically via `com.atproto.server.refreshSession` when the access JWT expires.
45- All data stays in `browser.storage.local`; nothing is transmitted to third-party services beyond the ATProto endpoints.
46- Maximum lengths follow the current Frontpage limits (120 characters for the title, 2048 for URLs).
47
48### Development tips
49
50- Inspect background/service-worker logs from `about:debugging` → **Inspect**.
51- The UI scripts (`popup.js` and `options.js`) log to the DevTools console attached to their respective documents.
52- When packaging for distribution, zip the contents of the `extension/` directory (see workflow below).
53- Licensed under the [Apache License 2.0](./LICENSE).
54
55### Development install (temporary)
56
571. Open `about:debugging#/runtime/this-firefox`.
582. Click **Load Temporary Add-on…** and choose `manifest.json` inside the `extension/` directory.
593. Pin the “Frontpage” toolbar button if you want quick access.
60
61> This method is ideal while iterating; Firefox forgets the add-on on restart.
62
63### Self-distribution pipeline
64
65This repository includes `.github/workflows/package-extension.yml` which builds (and optionally signs) the add-on using [`web-ext`](https://extensionworkshop.com/documentation/develop/web-ext-command-reference/).
66
671. Configure `AMO_JWT_ISSUER` and `AMO_JWT_SECRET` repository secrets with your AMO API credentials if you want automatic signing.
68 Without the secrets, the workflow still produces an unsigned ZIP you can download.
692. Trigger the workflow manually (`Actions` → **package-extension** → **Run workflow**).
703. Download the artifacts:
71 - `frontpage-extension-unsigned` contains the ZIP that `web-ext build` generates.
72 - `frontpage-extension-signed` (only when secrets are present) contains the signed `.xpi` from AMO for self-hosting.
734. Each run also publishes a GitHub Release (tagged `v<version>-<run-id>`) that ships the same ZIP/XPI assets, so you can share a permanent download link.
74 - Mozilla requires every signed upload to have a unique version number. Bump `version` in `extension/manifest.json` before rerunning the workflow if you need a new signed package.
75
76These artifacts can be hosted directly for self-distribution as described in the [Mozilla documentation](https://extensionworkshop.com/documentation/publish/self-distribution/).
77
78### Tangled mirror
79
80The `mirror-to-tangled.yml` workflow pushes every commit on `main` to Tangled, a federated Git hosting platform built on ATProto.
81Browse the mirror at <https://tangled.org/@galiglobal.com/frontpage_firefox_plugin>.
82Add a deploy key with write access as the `TANGLED_DEPLOY_KEY` repository secret so the mirror stays up to date.