Implement both blocklists and in-player blocking

This commit is contained in:
TC
2023-05-08 22:23:11 +02:00
parent c488c30015
commit 69f560cdd1
5 changed files with 338 additions and 10 deletions

View File

@ -1,4 +1,10 @@
module.exports = () => {
// Preload adblocker to inject scripts/styles
require("@cliqz/adblocker-electron-preload");
const config = require("./config");
module.exports = async () => {
if (await config.shouldUseBlocklists()) {
// Preload adblocker to inject scripts/styles
require("@cliqz/adblocker-electron-preload");
} else if ((await config.get("blocker")) === config.blockers.InPlayer) {
require("./inject");
}
};