aboutsummaryrefslogtreecommitdiff
path: root/main_background.js
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-09-27 09:38:22 +1000
committerYuchen Pei <hi@ypei.me>2022-09-27 09:38:22 +1000
commitdb0013b57cce91cd516e0d9ecfa6f758f3d14d03 (patch)
tree5b0b3b159951f7c9f43fbf0e4e313e638289b376 /main_background.js
parent313633d1b84efa6d171c69cae0297f24f8f2931f (diff)
disable contactfinder tests by default
It tends to time out. Also moved injectContactFinder
Diffstat (limited to 'main_background.js')
-rw-r--r--main_background.js21
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();