mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 10:11:46 +00:00
fix: fix #29
This commit is contained in:
@ -68,6 +68,3 @@ export const loadAdBlockerEngine = (
|
||||
};
|
||||
|
||||
export default { loadAdBlockerEngine };
|
||||
if (require.main === module) {
|
||||
loadAdBlockerEngine(); // Generate the engine without enabling it
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
export default () => {
|
||||
const path = require.resolve('@cliqz/adblocker-electron-preload'); // prevent require hoisting
|
||||
const path = '@cliqz/adblocker-electron-preload'; // prevent require hoisting
|
||||
require(path);
|
||||
};
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import config from './config';
|
||||
import config, { blockers } from './config';
|
||||
import inject from './inject';
|
||||
import injectCliqzPreload from './inject-cliqz-preload';
|
||||
|
||||
@ -7,7 +7,7 @@ export default async () => {
|
||||
// Preload adblocker to inject scripts/styles
|
||||
injectCliqzPreload();
|
||||
// eslint-disable-next-line @typescript-eslint/await-thenable
|
||||
} else if ((await config.get('blocker')) === config.blockers.InPlayer) {
|
||||
} else if ((await config.get('blocker')) === blockers.InPlayer) {
|
||||
inject();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user