From f3e1abe18e279576bc70df0cccff015693f95620 Mon Sep 17 00:00:00 2001 From: igorlogius <67047467+igorlogius@users.noreply.github.com> Date: Mon, 24 Jun 2024 05:08:18 +0200 Subject: [PATCH] fix: frame tab redirects --- background.js | 4 ++++ manifest.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/background.js b/background.js index 24d8d68..9434f54 100644 --- a/background.js +++ b/background.js @@ -316,6 +316,9 @@ async function onCommand(command) { } async function onBeforeNavigate(details) { + if (details.frameId > 0) { + return; + } if (typeof details.url !== "string") { return; } @@ -418,6 +421,7 @@ async function handlePermissionChange() { browser.tabs.onUpdated.addListener((tabId, changeInfo, tabInfo) => { if (changeInfo.url) { onBeforeNavigate({ + frameId: 0, tabId, url: changeInfo.url, }); diff --git a/manifest.json b/manifest.json index 354781b..bf88deb 100644 --- a/manifest.json +++ b/manifest.json @@ -36,5 +36,5 @@ "tabs" ], "optional_permissions": ["bookmarks", "history"], - "version": "1.1.34" + "version": "1.1.35" }