diff options
author | Ajay <[email protected]> | 2023-08-25 16:03:17 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2023-08-25 16:03:17 -0400 |
commit | 9946bd1af26ad285fb61486493cb9ce2322cb96f (patch) | |
tree | 215d749780366e3e5ee6231e063976a1eab59d14 | |
parent | 3b06d722709bbd3632865122a1ab460d3df34aab (diff) | |
download | SponsorBlock-9946bd1af26ad285fb61486493cb9ce2322cb96f.tar.gz SponsorBlock-9946bd1af26ad285fb61486493cb9ce2322cb96f.zip |
Use chromep in another spot
-rw-r--r-- | src/background.ts | 11 |
1 files changed, 1 insertions, 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] }); |