From 9946bd1af26ad285fb61486493cb9ce2322cb96f Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 25 Aug 2023 16:03:17 -0400 Subject: [PATCH] Use chromep in another spot --- src/background.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/background.ts b/src/background.ts index e8afa0a1..a160c839 100644 --- a/src/background.ts +++ b/src/background.ts @@ -155,16 +155,7 @@ chrome.runtime.onInstalled.addListener(function () { */ async function registerFirefoxContentScript(options: Registration) { if ("scripting" in chrome && "getRegisteredContentScripts" in chrome.scripting) { - // Bug in Firefox where you need to use browser namespace for this call - const getContentScripts = async (filter: browser.scripting.ContentScriptFilter) => { - if (isFirefoxOrSafari()) { - return await browser.scripting.getRegisteredContentScripts(filter); - } else { - return await chrome.scripting.getRegisteredContentScripts(filter); - } - }; - - const existingRegistrations = await getContentScripts({ + const existingRegistrations = await chromeP.scripting.getRegisteredContentScripts({ ids: [options.id] });