mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
21 lines
501 B
TypeScript
21 lines
501 B
TypeScript
/* eslint-disable @typescript-eslint/await-thenable */
|
|
/* renderer */
|
|
|
|
import { PluginConfig } from '../../config/dynamic';
|
|
|
|
const config = new PluginConfig('adblocker', { enableFront: true });
|
|
|
|
export const blockers = {
|
|
WithBlocklists: 'With blocklists',
|
|
InPlayer: 'In player',
|
|
};
|
|
|
|
export const shouldUseBlocklists = async () => await config.get('blocker') !== blockers.InPlayer;
|
|
|
|
export default {
|
|
shouldUseBlocklists,
|
|
blockers,
|
|
get: config.get.bind(this),
|
|
set: config.set.bind(this),
|
|
};
|