Specify which tab to update.
This commit is contained in:
parent
ed663484e2
commit
16ba17eb9c
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue