Last active
November 30, 2022 08:42
-
-
Save dimitrinicolas/0d0f9c57565e7dad976d4e80ed7a68bb to your computer and use it in GitHub Desktop.
Speed up Netflix when nobody talks (needs subtitles enabled)
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
const speedRate = 2; | |
const subtitles = document.querySelector('.player-timedtext'); | |
let observer = new MutationObserver(() => { | |
document.querySelector('video').playbackRate = subtitles.textContent | |
? 1 | |
: speedRate; | |
}).observe(subtitles, { childList: true }); |
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
observer.disconnect(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pas mal pas mal :D