diff --git a/package-lock.json b/package-lock.json index 112839dbb5..bd883693f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,6 +94,7 @@ } }, "jslib/common": { + "name": "@bitwarden/jslib-common", "version": "0.0.0", "license": "GPL-3.0", "dependencies": { diff --git a/src/background/tabs.background.ts b/src/background/tabs.background.ts index 7ba7a75a3d..7b43d7696a 100644 --- a/src/background/tabs.background.ts +++ b/src/background/tabs.background.ts @@ -2,24 +2,21 @@ import MainBackground from './main.background'; import NotificationBackground from './notification.background'; export default class TabsBackground { - private tabs: any; - constructor(private main: MainBackground, private notificationBackground: NotificationBackground) { - 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; } @@ -30,12 +27,12 @@ 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; } this.main.onUpdatedRan = true; - await this.notificationBackground.checkNotificationQueue(); + await this.notificationBackground.checkNotificationQueue(tab); await this.main.refreshBadgeAndMenu(); this.main.messagingService.send('tabUpdated'); this.main.messagingService.send('tabChanged'); diff --git a/src/content/notificationBar.ts b/src/content/notificationBar.ts index da3f25d7d4..b973f6f52e 100644 --- a/src/content/notificationBar.ts +++ b/src/content/notificationBar.ts @@ -467,6 +467,7 @@ document.addEventListener('DOMContentLoaded', event => { const iframe = document.createElement('iframe'); iframe.style.cssText = 'height: 42px; width: 100%; border: 0; min-height: initial;'; iframe.id = 'bit-notification-bar-iframe'; + iframe.src = barPageUrl; const frameDiv = document.createElement('div'); frameDiv.setAttribute('aria-live', 'polite');