chore: remove un used code
This commit is contained in:
@@ -1,18 +1,6 @@
|
||||
import browser from 'webextension-polyfill';
|
||||
import WakaTimeCore from './core/WakaTimeCore';
|
||||
|
||||
// Add a listener to resolve alarms
|
||||
browser.alarms.onAlarm.addListener(async (alarm) => {
|
||||
// |alarm| can be undefined because onAlarm also gets called from
|
||||
// window.setTimeout on old chrome versions.
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||
if (alarm?.name == 'heartbeatAlarm') {
|
||||
console.log('recording a heartbeat - alarm triggered');
|
||||
|
||||
await WakaTimeCore.recordHeartbeat();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Whenever a active tab is changed it records a heartbeat with that tab url.
|
||||
*/
|
||||
@@ -28,8 +16,6 @@ browser.windows.onFocusChanged.addListener(async (windowId) => {
|
||||
if (windowId != browser.windows.WINDOW_ID_NONE) {
|
||||
console.log('recording a heartbeat - active window changed');
|
||||
await WakaTimeCore.recordHeartbeat();
|
||||
} else {
|
||||
console.log('lost focus');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user