Post message to service worker to sendHeartbeat

This commit is contained in:
Sebastian Velez
2023-08-28 19:01:47 -05:00
parent 7d4fb6b90f
commit 3a430d66ce
5 changed files with 23 additions and 7 deletions

View File

@@ -1,5 +1,3 @@
import WakaTimeCore from './core/WakaTimeCore';
const twoMinutes = 120000;
interface DesignProject {
@@ -55,9 +53,8 @@ const init = async () => {
const { hostname } = document.location;
const projectDetails = getParser[hostname]?.();
if (projectDetails) {
await WakaTimeCore.recordHeartbeat(projectDetails);
chrome.runtime.sendMessage({ projectDetails, recordHeartbeat: true });
}
};