hotfix(adblocker): fix #1475

This commit is contained in:
JellyBrick
2023-12-02 23:13:21 +09:00
parent 0660f0b7ce
commit e9a395f67a

View File

@ -120,11 +120,20 @@ export default createPlugin({
async onConfigChange(newConfig) {
if (newConfig.blocker === blockers.WithBlocklists) {
await injectCliqzPreload();
} else if (newConfig.blocker === blockers.InPlayer) {
if (!isInjected()) {
inject();
}
}
},
},
renderer: {
async start({ getConfig }) {
const config = await getConfig();
if (config.blocker === blockers.InPlayer && !isInjected()) {
inject();
}
},
onConfigChange(newConfig) {
if (newConfig.blocker === blockers.InPlayer && !isInjected()) {
inject();
}
},
}
});