Document the extension and add MIT LICENSE
User-verified that v0.1.0 works in Firefox. Closing out the work with the documentation the AMO reviewer (and future-me) will want: - LICENSE: MIT, 2026. Matches the vendored qrcode-generator's license. - package.json: add license + author fields. - README: add "What you see" UX section, supported-versions rationale, ASCII build-flow diagram, AMO publishing notes, permissions table. - popup/popup.js: top-of-file block documenting the popup lifecycle and the dataflow from active-tab URL to rendered QR. - scripts/build.mjs: top-of-file block explaining why dist/ is the single source of truth for what ships. Closes dogcat epic firefox-share-as-qr-35mw and all 5 child tasks (see .dogcats/issues.jsonl). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8fa1809d9d
commit
e953a55571
6 changed files with 156 additions and 20 deletions
|
|
@ -1,3 +1,20 @@
|
|||
// Popup entry point. Runs every time the user clicks the toolbar icon.
|
||||
//
|
||||
// Lifecycle:
|
||||
// 1. `init()` reads the active tab's URL via the WebExtension `tabs` API
|
||||
// (granted by the `activeTab` permission, which only activates on user
|
||||
// gesture — no persistent host access).
|
||||
// 2. Browser-internal schemes (about:, moz-extension:, ...) short-circuit
|
||||
// to a friendly "can't share this page" message.
|
||||
// 3. Otherwise `renderQr()` asks the vendored qrcode-generator for an SVG
|
||||
// (smallest version that fits, error-correction level M ~15%) and
|
||||
// mounts it into the popup.
|
||||
// 4. The Copy URL button uses navigator.clipboard.writeText, gated by the
|
||||
// `clipboardWrite` permission.
|
||||
//
|
||||
// The vendored library is imported here so `bun build` can inline it; there
|
||||
// is no global `qrcode` at runtime.
|
||||
|
||||
import qrcode from "../vendor/qrcode.js";
|
||||
|
||||
// Schemes that either can't be QR-encoded usefully or are browser-internal.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue