From 990b9c8f5647a1a5a5a938c76d2476539ae19edd Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Sat, 26 Oct 2024 22:29:51 -0500 Subject: [PATCH] Make cookies dump to idb as an object instead of a string, makes debugging easier, adds a small bit of overhead. --- src/worker/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worker/index.ts b/src/worker/index.ts index b253a38..11e9505 100644 --- a/src/worker/index.ts +++ b/src/worker/index.ts @@ -49,7 +49,7 @@ export class ScramjetServiceWorker extends EventTarget { const res = db.result; const tx = res.transaction("cookies", "readwrite"); const store = tx.objectStore("cookies"); - store.put(this.cookieStore.dump(), "cookies"); + store.put(JSON.parse(this.cookieStore.dump()), "cookies"); } }); }