diff --git a/source/background-scripts/initialize.ts b/source/background-scripts/initialize.ts index 2e5cf91..88c859e 100644 --- a/source/background-scripts/initialize.ts +++ b/source/background-scripts/initialize.ts @@ -39,7 +39,7 @@ browser.webNavigation.onBeforeNavigate.addListener(async (details) => { await browser.storage.local.get(), )) { const redirect = parseRedirect(parameters, id); - if (redirect === undefined) { + if (redirect === undefined || !redirect.parameters.enabled) { continue; } diff --git a/source/redirect/base.ts b/source/redirect/base.ts index f19c8ee..0c4b6e1 100644 --- a/source/redirect/base.ts +++ b/source/redirect/base.ts @@ -15,6 +15,7 @@ export function narrowRedirectType(value: string): value is RedirectType { } export type RedirectParameters = { + enabled: boolean; matcherType: MatcherType; matcherValue: string; redirectType: RedirectType;