mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
hotfix(adblocker): fix #1475
This commit is contained in:
@ -120,11 +120,20 @@ export default createPlugin({
|
|||||||
async onConfigChange(newConfig) {
|
async onConfigChange(newConfig) {
|
||||||
if (newConfig.blocker === blockers.WithBlocklists) {
|
if (newConfig.blocker === blockers.WithBlocklists) {
|
||||||
await injectCliqzPreload();
|
await injectCliqzPreload();
|
||||||
} else if (newConfig.blocker === blockers.InPlayer) {
|
}
|
||||||
if (!isInjected()) {
|
},
|
||||||
|
},
|
||||||
|
renderer: {
|
||||||
|
async start({ getConfig }) {
|
||||||
|
const config = await getConfig();
|
||||||
|
if (config.blocker === blockers.InPlayer && !isInjected()) {
|
||||||
inject();
|
inject();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onConfigChange(newConfig) {
|
||||||
|
if (newConfig.blocker === blockers.InPlayer && !isInjected()) {
|
||||||
|
inject();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user