aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/background
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/background')
-rw-r--r--src/pages/background/background.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pages/background/background.js b/src/pages/background/background.js
index c94b61dc..9ae50dd3 100644
--- a/src/pages/background/background.js
+++ b/src/pages/background/background.js
@@ -110,6 +110,7 @@ browser.storage.sync.get(
"invidiousRandomPool",
"bibliogramRandomPool",
"scribeRandomPool",
+ "wikilessRandomPool",
"exceptions",
],
(result) => {
@@ -670,7 +671,12 @@ browser.webRequest.onBeforeRequest.addListener(
);
browser.tabs.onUpdated.addListener((tabId, changeInfo, _) => {
- const url = new URL(changeInfo.url);
+ let url;
+ try {
+ url = new URL(changeInfo.url)
+ } catch (_) {
+ return;
+ }
var protocolHost = `${url.protocol}//${url.host}`;
var mightyList = [];
mightyList.push(...invidiousInstances);
@@ -684,7 +690,6 @@ browser.tabs.onUpdated.addListener((tabId, changeInfo, _) => {
if (mightyList.includes(protocolHost))
browser.pageAction.show(tabId);
-
});