diff --git a/www/js/version.json b/www/js/version.json index 5ea5545..42ae73f 100644 --- a/www/js/version.json +++ b/www/js/version.json @@ -1,5 +1,5 @@ { - "VERSION": "v0.7.2", - "VERSION_NUMBER": "0.7.2", - "BUILD_DATE": "2026-04-19T17:37:32.473Z" + "VERSION": "v0.7.3", + "VERSION_NUMBER": "0.7.3", + "BUILD_DATE": "2026-04-19T17:43:13.562Z" } diff --git a/www/music.html b/www/music.html index a6bfd71..46cd46e 100644 --- a/www/music.html +++ b/www/music.html @@ -1617,6 +1617,21 @@ import { GreyscaleAPI } from './js/greyscale-api.mjs'; return message.includes('authentication required'); } + async function tryGetPubkeyWithoutPrompt({ attempts = 8, delayMs = 350 } = {}) { + for (let i = 0; i < attempts; i += 1) { + try { + const pubkey = await getPubkey(); + if (pubkey) return pubkey; + } catch { + // Signer can attach slightly after initial script execution. + } + if (i < attempts - 1) { + await new Promise((resolve) => setTimeout(resolve, delayMs)); + } + } + return ''; + } + function isReadOnlyTargetMode() { return Boolean(targetPubkey && (!currentPubkey || targetPubkey !== currentPubkey)); } @@ -1695,13 +1710,8 @@ import { GreyscaleAPI } from './js/greyscale-api.mjs'; throw error; } - try { - currentPubkey = await getPubkey(); - isAuthenticated = Boolean(currentPubkey); - } catch { - currentPubkey = null; - isAuthenticated = false; - } + currentPubkey = await tryGetPubkeyWithoutPrompt(); + isAuthenticated = Boolean(currentPubkey); } async function initializeAuthenticatedPageFeatures() {