mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2026-01-04 15:49:03 +03:00
Fix invidious support of Firefox
This commit is contained in:
@@ -204,9 +204,13 @@ async function registerFirefoxContentScript(options: Registration) {
|
||||
*/
|
||||
async function unregisterFirefoxContentScript(id: string) {
|
||||
if ("scripting" in chrome && "getRegisteredContentScripts" in chrome.scripting) {
|
||||
await chromeP.scripting.unregisterContentScripts({
|
||||
ids: [id]
|
||||
});
|
||||
try {
|
||||
await chromeP.scripting.unregisterContentScripts({
|
||||
ids: [id]
|
||||
});
|
||||
} catch (e) {
|
||||
// Already registered
|
||||
}
|
||||
} else {
|
||||
if (contentScriptRegistrations[id]) {
|
||||
contentScriptRegistrations[id].unregister();
|
||||
|
||||
Reference in New Issue
Block a user