mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 10:11:46 +00:00
hotfix(adblocker): fix #1475
This commit is contained in:
@ -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();
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user