Don't redirect when disabled.
This commit is contained in:
parent
cd453b3e6f
commit
a05f54306a
|
@ -33,6 +33,13 @@ browser.runtime.onStartup.addListener(async () => {
|
|||
});
|
||||
|
||||
browser.webNavigation.onBeforeNavigate.addListener(async (details) => {
|
||||
const {redirectsEnabled} = await browser.storage.local.get({
|
||||
redirectsEnabled: true,
|
||||
});
|
||||
if (redirectsEnabled === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!details.url.startsWith('http') || details.frameId > 0) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue