diff --git a/src/background/tabs.background.ts b/src/background/tabs.background.ts index 8f4d4e12b1..8963f83fbe 100644 --- a/src/background/tabs.background.ts +++ b/src/background/tabs.background.ts @@ -1,24 +1,21 @@ import MainBackground from './main.background'; export default class TabsBackground { - private tabs: any; - constructor(private main: MainBackground) { - this.tabs = chrome.tabs; } async init() { - if (!this.tabs) { + if (!chrome.tabs) { return; } - this.tabs.onActivated.addListener(async (activeInfo: any) => { + chrome.tabs.onActivated.addListener(async (activeInfo: chrome.tabs.TabActiveInfo) => { await this.main.refreshBadgeAndMenu(); this.main.messagingService.send('tabActivated'); this.main.messagingService.send('tabChanged'); }); - this.tabs.onReplaced.addListener(async (addedTabId: any, removedTabId: any) => { + chrome.tabs.onReplaced.addListener(async (addedTabId: number, removedTabId: number) => { if (this.main.onReplacedRan) { return; } @@ -29,7 +26,7 @@ export default class TabsBackground { this.main.messagingService.send('tabChanged'); }); - this.tabs.onUpdated.addListener(async (tabId: any, changeInfo: any, tab: any) => { + chrome.tabs.onUpdated.addListener(async (tabId: number, changeInfo: chrome.tabs.TabChangeInfo, tab: chrome.tabs.Tab) => { if (this.main.onUpdatedRan) { return; }