mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 03:11:46 +00:00
fix: apply fix from eslint
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
import { BrowserWindow } from 'electron';
|
||||
|
||||
import { loadAdBlockerEngine } from './blocker';
|
||||
import config from './config';
|
||||
import { shouldUseBlocklists } from './config';
|
||||
|
||||
import type { ConfigType } from '../../config/dynamic';
|
||||
|
||||
type AdBlockOptions = ConfigType<'adblocker'>;
|
||||
|
||||
export default async (win: BrowserWindow, options: AdBlockOptions) => {
|
||||
if (await config.shouldUseBlocklists()) {
|
||||
if (await shouldUseBlocklists()) {
|
||||
loadAdBlockerEngine(
|
||||
win.webContents.session,
|
||||
options.cache,
|
||||
|
||||
@ -4,6 +4,7 @@ export default async () => {
|
||||
if (await config.shouldUseBlocklists()) {
|
||||
// Preload adblocker to inject scripts/styles
|
||||
require('@cliqz/adblocker-electron-preload');
|
||||
// eslint-disable-next-line @typescript-eslint/await-thenable
|
||||
} else if ((await config.get('blocker')) === config.blockers.InPlayer) {
|
||||
require('./inject.js');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user