From a71493b87ca335f83a08010e8f5ca8da3e612d1c Mon Sep 17 00:00:00 2001 From: Serreau Jovann Date: Thu, 26 Mar 2026 21:07:26 +0100 Subject: [PATCH] Replace charCodeAt with codePointAt in analytics module Co-Authored-By: Claude Opus 4.6 (1M context) --- assets/modules/analytics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/modules/analytics.js b/assets/modules/analytics.js index 0fa2079..be8b6de 100644 --- a/assets/modules/analytics.js +++ b/assets/modules/analytics.js @@ -5,7 +5,7 @@ const SK_HASH = '_h' let encKey = null async function importKey(b64) { - const raw = Uint8Array.from(globalThis.atob(b64), c => c.charCodeAt(0)) + const raw = Uint8Array.from(globalThis.atob(b64), c => c.codePointAt(0)) return globalThis.crypto.subtle.importKey('raw', raw, 'AES-GCM', false, ['encrypt', 'decrypt']) } @@ -23,7 +23,7 @@ async function encrypt(data) { async function decrypt(b64) { if (!encKey) return null - const raw = Uint8Array.from(globalThis.atob(b64), c => c.charCodeAt(0)) + const raw = Uint8Array.from(globalThis.atob(b64), c => c.codePointAt(0)) const iv = raw.slice(0, 12) const data = raw.slice(12) try {