mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 02:31:45 +00:00
Implement both blocklists and in-player blocking
This commit is contained in:
13
plugins/adblocker/config.js
Normal file
13
plugins/adblocker/config.js
Normal file
@ -0,0 +1,13 @@
|
||||
const { PluginConfig } = require("../../config/dynamic");
|
||||
|
||||
const config = new PluginConfig("adblocker", { enableFront: true });
|
||||
|
||||
const blockers = {
|
||||
WithBlocklists: "With blocklists",
|
||||
InPlayer: "In player",
|
||||
};
|
||||
|
||||
const shouldUseBlocklists = async () =>
|
||||
(await config.get("blocker")) !== blockers.InPlayer;
|
||||
|
||||
module.exports = { shouldUseBlocklists, blockers, ...config };
|
||||
Reference in New Issue
Block a user