Last active
May 30, 2022 21:26
-
-
Save viking/7a7133a6eb0a74ae449f4a0e97f32d09 to your computer and use it in GitHub Desktop.
Auto-skip commercials in Hulu live TV recorded programs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var huluInt = setInterval(() => { | |
if (document.querySelector('div.AdUnitView') !== null) { | |
document.querySelector('.FastForwardButton').click(); | |
setTimeout(() => { | |
let event = new MouseEvent('pointerenter'); | |
document.querySelector('#web-player-app').dispatchEvent(event); | |
}, 2000); | |
setTimeout(() => { | |
let event = new MouseEvent('pointerleave'); | |
document.querySelector('#web-player-app').dispatchEvent(event); | |
}, 3000); | |
} | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment