Skip to content

Instantly share code, notes, and snippets.

@viking
Last active May 30, 2022 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viking/7a7133a6eb0a74ae449f4a0e97f32d09 to your computer and use it in GitHub Desktop.
Save viking/7a7133a6eb0a74ae449f4a0e97f32d09 to your computer and use it in GitHub Desktop.
Auto-skip commercials in Hulu live TV recorded programs
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