From 16ba17eb9c110e2681b13a2b16987c457d2089a9 Mon Sep 17 00:00:00 2001 From: Bauke Date: Wed, 26 Oct 2022 18:00:42 +0200 Subject: [PATCH] Specify which tab to update. --- source/background-scripts/initialize.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/background-scripts/initialize.ts b/source/background-scripts/initialize.ts index 88c859e..0d22280 100644 --- a/source/background-scripts/initialize.ts +++ b/source/background-scripts/initialize.ts @@ -45,7 +45,7 @@ browser.webNavigation.onBeforeNavigate.addListener(async (details) => { if (redirect.isMatch(url)) { const redirectedUrl = redirect.redirect(url); - await browser.tabs.update({url: redirectedUrl.href}); + await browser.tabs.update(details.tabId, {url: redirectedUrl.href}); await browser.storage.local.set({ latestTime: Date.now(), latestUrl: url.href,