- JavaScript 71.4%
- CSS 22.5%
- HTML 6.1%
MV3 WebExtension that turns the active tab's URL into a scannable QR code via a toolbar popup. The popup runs locally — no network requests. Build pipeline: `bun build` bundles popup.js + the vendored kazuhikoarase/qrcode-generator (MIT, pinned to 83b7e8f) into a single ~23 KB minified ESM file under dist/. web-ext operates on dist/, so the packaged zip contains only what actually ships (~28 KB). Scripts: - bun run build — bundle + copy assets into dist/ - bun run lint — build + web-ext lint (0 errors / 0 warnings) - bun run package — build + produce a signable .zip - bun run start — build + launch Firefox with the extension loaded Tracks dogcat epic firefox-share-as-qr-35mw and its 5 child tasks (scaffold, vendor lib, popup UI, icons, README). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .dogcats | ||
| icons | ||
| popup | ||
| scripts | ||
| vendor | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| manifest.json | ||
| package.json | ||
| README.md | ||
| web-ext-config.cjs | ||
Share as QR
A small Firefox extension that turns the current tab's URL into a scannable QR code, so you can hand a page off to a phone (or another machine) without typing.
Click the toolbar icon → a popup shows the QR code plus a "Copy URL" button. Nothing leaves your browser.
Develop
This project uses bun as both the script runner and the
bundler. popup/popup.js imports the vendored QR library; bun build inlines
it into a single ESM file under dist/. Firefox loads the extension from
dist/, never from the source tree directly.
bun run build # bundle popup.js + assets into dist/
bun run lint # build + web-ext lint
bun run package # build + produce a signable .zip in web-ext-artifacts/
bun run start # build + launch Firefox with the extension loaded
To load the extension manually after a build:
- Open
about:debugging#/runtime/this-firefoxin Firefox 142 or newer. - Click Load Temporary Add-on… and pick
dist/manifest.json.
The temporary install is wiped when Firefox restarts; reload it the same way during dev.
Privacy
The extension makes no network requests. The QR code is generated locally in
the popup using the bundled vendor/qrcode.js library. The
browser_specific_settings.gecko.data_collection_permissions field in the
manifest declares "none" accordingly.
Permissions used:
activeTab— read the active tab's URL when the popup opens.clipboardWrite— used by the Copy URL button.
Browser-internal URLs (about:, chrome:, view-source:, moz-extension:,
data:, javascript:, resource:) are not QR-encoded — the popup shows a
friendly message instead.
Third-party code
vendor/qrcode.js— kazuhikoarase/qrcode-generator, pinned to commit83b7e8fe3fddd3b0368dbafd6ce56995bd25e3c8. MIT licensed; full license text invendor/LICENSE.qrcode-generator(also copied intodist/so it ships with every build).
Project layout
manifest.json MV3 manifest
popup/ Toolbar popup source (HTML/CSS/JS)
vendor/qrcode.js Bundled QR encoder (MIT, vendored, imported by popup.js)
icons/icon.svg Toolbar icon (single SVG, used at every size)
scripts/build.mjs Bun build + asset copy → dist/
web-ext-config.cjs Tells web-ext to operate on dist/
dist/ Build output (gitignored). What ships.