diff options
Diffstat (limited to 'main_background.js')
-rw-r--r-- | main_background.js | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/main_background.js b/main_background.js index c983f2f..76cc8c4 100644 --- a/main_background.js +++ b/main_background.js @@ -322,6 +322,16 @@ async function connected(p) { } /** +* Loads the contact finder on the given tab ID. +*/ +async function injectContactFinder(tabId) { + await Promise.all([ + browser.tabs.insertCSS(tabId, { file: '/content/overlay.css', cssOrigin: 'user' }), + browser.tabs.executeScript(tabId, { file: '/content/contactFinder.js' }), + ]); +} + +/** * The callback for tab closings. * * Delete the info we are storing about this tab if there is any. @@ -890,15 +900,4 @@ async function init_addon() { } } - -/** -* Loads the contact finder on the given tab ID. -*/ -async function injectContactFinder(tabId) { - await Promise.all([ - browser.tabs.insertCSS(tabId, { file: '/content/overlay.css', cssOrigin: 'user' }), - browser.tabs.executeScript(tabId, { file: '/content/contactFinder.js' }), - ]); -} - init_addon(); |