Specify which tab to update.

This commit is contained in:
Bauke 2022-10-26 18:00:42 +02:00
parent ed663484e2
commit 16ba17eb9c
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ browser.webNavigation.onBeforeNavigate.addListener(async (details) => {
if (redirect.isMatch(url)) { if (redirect.isMatch(url)) {
const redirectedUrl = redirect.redirect(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({ await browser.storage.local.set({
latestTime: Date.now(), latestTime: Date.now(),
latestUrl: url.href, latestUrl: url.href,