04/19 Update extension: persistent session, duplication check - again
This commit is contained in:
@@ -65,6 +65,13 @@ chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
|
||||
|
||||
chrome.runtime.onMessage.addListener((msg, sender, sendResponse) => {
|
||||
|
||||
// No-op ping from popup — keeps the service worker alive while the browser
|
||||
// is open so chrome.storage.session is not wiped between popup openings.
|
||||
if (msg.type === 'KEEPALIVE') {
|
||||
sendResponse({ ok: true });
|
||||
return false;
|
||||
}
|
||||
|
||||
// Popup signals vault cache was refreshed → re-check all tab badges.
|
||||
if (msg.type === 'VAULT_UPDATED') {
|
||||
refreshAllBadges();
|
||||
|
||||
Reference in New Issue
Block a user