From 1d45461265668b3a72e870a1dd7b06ebc54bb571 Mon Sep 17 00:00:00 2001 From: Ankit Ahuja <61857+ankit@users.noreply.github.com> Date: Wed, 15 May 2024 18:23:46 -0400 Subject: [PATCH] don't send redundant context menu msg to chrome extension page --- src/background/listeners.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/background/listeners.ts b/src/background/listeners.ts index bee25303..d8277389 100644 --- a/src/background/listeners.ts +++ b/src/background/listeners.ts @@ -59,7 +59,9 @@ chrome.tabs.onUpdated.addListener(async (tabId, _, tab) => { name: 'TabUpdated', }; - chrome.tabs.sendMessage(tabId, message); + if (!tab.url?.includes('chrome-extension://')) { + chrome.tabs.sendMessage(tabId, message); + } } });