From 9532f82b2e6a31d9711b2cbbe58889c7720a7867 Mon Sep 17 00:00:00 2001 From: Ezzudin Alkotob Date: Thu, 4 Sep 2025 12:11:15 -0700 Subject: [PATCH] tab ids tweak --- src/js/background/historyManager.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/js/background/historyManager.ts b/src/js/background/historyManager.ts index e1013f1..d86b95e 100644 --- a/src/js/background/historyManager.ts +++ b/src/js/background/historyManager.ts @@ -67,14 +67,19 @@ export async function upsertInvalidRecord( const tabIDKey = String(tabID); const entry = await chrome.storage.local.get(tabIDKey); + const violations = TAB_TO_VIOLATING_SRCS.get(tabID) ?? new Set(); + if (Object.keys(entry).length !== 0) { creationTime = entry[tabIDKey].creationTime; + entry[tabIDKey].violations.forEach((violation: Violation) => { + violations.add(violation); + }); } return chrome.storage.local.set({ [tabIDKey]: { creationTime, - violations: Array.from(TAB_TO_VIOLATING_SRCS.get(tabID) ?? new Set()), + violations: Array.from(violations), url: tab.url, }, });