mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-12 02:51:46 +00:00
fix: apply fix from eslint
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
function skipAd(target: Element) {
|
||||
const skipButton = target.querySelector<HTMLButtonElement>('button.ytp-ad-skip-button-modern');
|
||||
const skipButton = target.querySelector<HTMLButtonElement>(
|
||||
'button.ytp-ad-skip-button-modern',
|
||||
);
|
||||
if (skipButton) {
|
||||
skipButton.click();
|
||||
}
|
||||
@ -17,7 +19,7 @@ function speedUpAndMute(player: Element, isAdShowing: boolean) {
|
||||
}
|
||||
}
|
||||
|
||||
export const loadAdSpeedup = async () => {
|
||||
export const loadAdSpeedup = () => {
|
||||
const player = document.querySelector<HTMLVideoElement>('#movie_player');
|
||||
if (!player) return;
|
||||
|
||||
@ -53,4 +55,4 @@ export const loadAdSpeedup = async () => {
|
||||
player.classList.contains('ad-interrupting');
|
||||
speedUpAndMute(player, isAdShowing);
|
||||
skipAd(player);
|
||||
}
|
||||
};
|
||||
|
||||
@ -79,7 +79,7 @@ export default createPlugin({
|
||||
if (config.blocker === blockers.AdSpeedup) {
|
||||
await loadAdSpeedup();
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
backend: {
|
||||
mainWindow: null as BrowserWindow | null,
|
||||
|
||||
Reference in New Issue
Block a user