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