Add an enabled property to redirects.
This commit is contained in:
parent
a93b5ed92d
commit
055be574c5
|
@ -39,7 +39,7 @@ browser.webNavigation.onBeforeNavigate.addListener(async (details) => {
|
||||||
await browser.storage.local.get(),
|
await browser.storage.local.get(),
|
||||||
)) {
|
)) {
|
||||||
const redirect = parseRedirect(parameters, id);
|
const redirect = parseRedirect(parameters, id);
|
||||||
if (redirect === undefined) {
|
if (redirect === undefined || !redirect.parameters.enabled) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ export function narrowRedirectType(value: string): value is RedirectType {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type RedirectParameters = {
|
export type RedirectParameters = {
|
||||||
|
enabled: boolean;
|
||||||
matcherType: MatcherType;
|
matcherType: MatcherType;
|
||||||
matcherValue: string;
|
matcherValue: string;
|
||||||
redirectType: RedirectType;
|
redirectType: RedirectType;
|
||||||
|
|
Loading…
Reference in New Issue