diff --git a/src/core/WakaTimeCore.ts b/src/core/WakaTimeCore.ts index 5e20e58..e2e2135 100644 --- a/src/core/WakaTimeCore.ts +++ b/src/core/WakaTimeCore.ts @@ -70,17 +70,6 @@ class WakaTimeCore { if (tabs.length == 0) return; const currentActiveTab = tabs[0]; - let debug = false; - - // If the current active tab has devtools open - if ( - inArray( - currentActiveTab.id, - this.tabsWithDevtoolsOpen.map((tab) => tab.id), - ) - ) { - debug = true; - } if (items.loggingStyle == 'blacklist') { if (!contains(currentActiveTab.url as string, items.blacklist as string)) { @@ -89,7 +78,6 @@ class WakaTimeCore { project: null, url: currentActiveTab.url as string, }, - debug, apiKey, ); } else { @@ -104,7 +92,7 @@ class WakaTimeCore { items.whitelist as string, ); if (heartbeat.url) { - await this.sendHeartbeat(heartbeat, debug, apiKey); + await this.sendHeartbeat(heartbeat, apiKey); } else { await changeExtensionState('whitelisted'); console.log(`${currentActiveTab.url} is not on a whitelist.`); @@ -183,7 +171,7 @@ class WakaTimeCore { * @param heartbeat * @param debug */ - async sendHeartbeat(heartbeat: SendHeartbeat, debug: boolean, apiKey: string): Promise { + async sendHeartbeat(heartbeat: SendHeartbeat, apiKey: string): Promise { let payload; const loggingType = await this.getLoggingType(); @@ -191,12 +179,12 @@ class WakaTimeCore { // And send that in heartbeat if (loggingType == 'domain') { heartbeat.url = getDomainFromUrl(heartbeat.url); - payload = this.preparePayload(heartbeat, 'domain', debug); + payload = this.preparePayload(heartbeat, 'domain'); await this.sendPostRequestToApi(payload, apiKey); } // Send entity in heartbeat else if (loggingType == 'url') { - payload = this.preparePayload(heartbeat, 'url', debug); + payload = this.preparePayload(heartbeat, 'url'); await this.sendPostRequestToApi(payload, apiKey); } } @@ -224,10 +212,9 @@ class WakaTimeCore { * @returns {*} * @private */ - preparePayload(heartbeat: SendHeartbeat, type: string, debug = false): Record { + preparePayload(heartbeat: SendHeartbeat, type: string): Record { return { entity: heartbeat.url, - is_debugging: debug, plugin: 'browser-wakatime/' + config.version, project: heartbeat.project ?? '<>', time: moment().format('X'), diff --git a/src/utils/changeExtensionIcon.ts b/src/utils/changeExtensionIcon.ts index a5a426f..d1e8d1a 100644 --- a/src/utils/changeExtensionIcon.ts +++ b/src/utils/changeExtensionIcon.ts @@ -10,7 +10,7 @@ export default async function changeExtensionIcon(color?: ColorIconTypes): Promi if (color) { const path = `./graphics/wakatime-logo-38-${color}.png`; - await browser.browserAction.setIcon({ + await browser.action.setIcon({ path: path, }); } else { @@ -21,7 +21,7 @@ export default async function changeExtensionIcon(color?: ColorIconTypes): Promi theme === config.theme ? './graphics/wakatime-logo-38.png' : './graphics/wakatime-logo-38-white.png'; - await browser.browserAction.setIcon({ + await browser.action.setIcon({ path: path, }); } diff --git a/src/utils/changeExtensionTooltip.ts b/src/utils/changeExtensionTooltip.ts index ef4e4ba..9c9e647 100644 --- a/src/utils/changeExtensionTooltip.ts +++ b/src/utils/changeExtensionTooltip.ts @@ -12,5 +12,5 @@ export default async function changeExtensionTooltip(text: string): Promise