diff options
| author | Adam Soltys <[email protected]> | 2026-10-01 16:34:55 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-01 16:34:55 -0700 |
| commit | 66d41d1aa1f5c60cd63b1691ba6bf70e88cf78fa (patch) | |
| tree | b26348dfe27873e9bd610b67a5880de00cf3db72 /src/scan.js | |
| parent | a7806172f7ede9be345750c93e5fa72e10e9b953 (diff) | |
| download | coinosv3-66d41d1aa1f5c60cd63b1691ba6bf70e88cf78fa.tar.gz coinosv3-66d41d1aa1f5c60cd63b1691ba6bf70e88cf78fa.zip | |
The standalone wallet opened from a disk shows its avatars, font and languages.
With no files beside it, relative punks/, locales/, nip46.js and jsqr.js
looked on the disk. From file:// they now come from v3.coinos.io (images
and scripts need no CORS; /locales/ now sends Access-Control-Allow-Origin
on the server), and standalone.html carries Public Sans inline.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VP5Ljqk7EYcm5QQAbzDwog
Diffstat (limited to 'src/scan.js')
| -rw-r--r-- | src/scan.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scan.js b/src/scan.js index a0d520c..083d5bb 100644 --- a/src/scan.js +++ b/src/scan.js @@ -1,3 +1,4 @@ +import { assetUrl } from './asset-url.js'; // Camera QR scanner. Opens a fullscreen overlay, streams the back camera, and // resolves with the decoded string (or null if the user cancels). // @@ -16,7 +17,7 @@ function loadJsQR() { if (!jsqrLoader) { jsqrLoader = new Promise((resolve, reject) => { const s = document.createElement('script'); - s.src = 'jsqr.js'; + s.src = assetUrl('jsqr.js'); s.onload = () => (window.jsQR ? resolve(window.jsQR) : reject(new Error('decoder unavailable'))); s.onerror = () => reject(new Error('decoder unavailable')); document.head.appendChild(s); |
