Skip to content

feat(extension): Firefox and Edge web clipper support#644

Merged
h4yfans merged 1 commit into
mainfrom
firefox-edge-clipper
Jun 30, 2026
Merged

feat(extension): Firefox and Edge web clipper support#644
h4yfans merged 1 commit into
mainfrom
firefox-edge-clipper

Conversation

@h4yfans

@h4yfans h4yfans commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

What

Firefox and Edge join Chrome as targets of the same WXT web-clipper build — no new app, no duplicated code. All clipper logic already uses the cross-browser browser.* API and shares @memry/article-extract, so the browsers are build targets, not forks.

Changes

Extension (apps/extension)

  • wxt.config: gecko id + MV3 floors (Firefox 140 / Android 142) + data_collection_permissions: [none] for AMO. Firefox builds force --mv3 so browser.action / host_permissions match the Chrome source unchanged.
  • package.json: dev / build / zip scripts for :firefox and :edge.
  • README: load + build instructions for Firefox (temporary add-on) and Edge.

Desktop capture (apps/desktop/src/main/capture)

  • Accept moz-extension:// (Firefox) origins during pairing. The /pair/request and claimPairing guards were hardcoded to chrome-extension://, so Firefox's origin was rejected and the popup showed "Approve the Memry extension, then try again." Factored the check into isExtensionOrigin() in auth.ts (single source of truth) + regression tests. Edge uses chrome-extension://, so no server change was needed.

Docs

  • capturing.md: the extension runs on Chrome, Edge, and Firefox 140+.

Verification

  • build:firefox → MV3 manifest (action, host_permissions, background.scripts); AMO upload validates (0 errors), and a reproducible source zip rebuilds byte-identical.
  • pnpm --filter @memry/desktop test:main → 3288 passed (incl. new Firefox pairing cases).
  • extension typecheck + lint clean; docs:impact --strict + docs:build pass.

Note

Overlaps with #643 (safari-clipper): both extend isExtensionOrigin — this adds moz-extension://, #643 adds safari-web-extension://. Trivial merge: combine the two prefixes.

WXT already shares all clipper logic via browser.* + @memry/article-extract,
so Firefox and Edge become build targets of the same extension, not new apps.

- wxt.config: gecko id + MV3 floors (FF 140 / Android 142) +
  data_collection_permissions:[none] for AMO; Firefox builds force --mv3 so
  browser.action/host_permissions match the Chrome source unchanged.
- package.json: dev/build/zip scripts for :firefox and :edge.
- capture server: accept moz-extension:// (Firefox) origins during pairing.
  The /pair/request and claimPairing guards were hardcoded to
  chrome-extension://, so Firefox's moz-extension:// origin was rejected and
  the popup showed 'Approve the Memry extension, then try again.' Factored the
  check into isExtensionOrigin() in auth.ts (single source of truth) and added
  regression tests. Edge uses chrome-extension://, so it needed no server change.
- README: load/build instructions for Firefox (temp add-on) and Edge.
@github-actions github-actions Bot added dependencies documentation Improvements or additions to documentation enhancement New feature or request test labels Jun 30, 2026
@h4yfans h4yfans marked this pull request as ready for review June 30, 2026 23:23
@h4yfans h4yfans merged commit c995855 into main Jun 30, 2026
13 checks passed
@h4yfans h4yfans deleted the firefox-edge-clipper branch June 30, 2026 23:23
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies documentation Improvements or additions to documentation enhancement New feature or request test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant