diff --git a/src/background.ts b/src/background.ts index 75adc66..68432e8 100644 --- a/src/background.ts +++ b/src/background.ts @@ -60,14 +60,6 @@ browser.tabs.onUpdated.addListener(async (tabId, changeInfo) => { } }); -/** - * Creates IndexedDB - * https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API - */ -self.addEventListener('activate', async () => { - await WakaTimeCore.db(); -}); - browser.runtime.onMessage.addListener(async (request: { task: string }, sender) => { if (request.task === 'handleActivity') { if (!sender.tab?.id) return; diff --git a/src/config/config.test.ts b/src/config/config.test.ts index 0730075..821ed4c 100644 --- a/src/config/config.test.ts +++ b/src/config/config.test.ts @@ -58,7 +58,7 @@ describe('wakatime config', () => { "chrome://", "about:", ], - "queueName": "heartbeatQueue", + "queueName": "heartbeatsQueue", "socialMediaSites": [ "facebook.com", "instagram.com", diff --git a/src/config/config.ts b/src/config/config.ts index 9a861c5..6b4fe4e 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -164,7 +164,7 @@ const config: Config = { nonTrackableSites: ['chrome://', 'about:'], - queueName: 'heartbeatQueue', + queueName: 'heartbeatsQueue', socialMediaSites: [ 'facebook.com', diff --git a/src/core/WakaTimeCore.ts b/src/core/WakaTimeCore.ts index b46c5ff..37f9149 100644 --- a/src/core/WakaTimeCore.ts +++ b/src/core/WakaTimeCore.ts @@ -27,7 +27,7 @@ class WakaTimeCore { * a library that adds promises to IndexedDB and makes it easy to use */ async db() { - return openDB('wakatime', 1, { + return openDB('wakatime', 2, { upgrade(db) { db.createObjectStore(config.queueName, { keyPath: 'id',