fix(reading-progress): load and display progress on fresh sessions; include external URL keys and avoid double-encoding; add debug guard

This commit is contained in:
Gigi
2025-10-22 02:02:39 +02:00
parent 0bc84e7c6c
commit a02413a7cb
4 changed files with 22 additions and 11 deletions

View File

@@ -98,11 +98,8 @@ export function generateArticleIdentifier(naddrOrUrl: string): string {
if (naddrOrUrl.startsWith('nostr:')) {
return naddrOrUrl.replace('nostr:', '')
}
// For URLs, use base64url encoding (URL-safe)
return btoa(naddrOrUrl)
.replace(/\+/g, '-')
.replace(/\//g, '_')
.replace(/=+$/, '')
// For URLs, return the raw URL. Downstream tag generation will encode as needed.
return naddrOrUrl
}
/**