Created
July 28, 2025 23:08
-
-
Save asdqdsa/a0bef5b79b9062ecb4f1b841200892ed to your computer and use it in GitHub Desktop.
yt-loop
This file contains hidden or 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
| // inject | |
| function ytLoop(from, to) { | |
| const loop = setInterval(() => { | |
| const player = document.getElementById("movie_player"); | |
| if (player.getCurrentTime() >= to) { | |
| player.seekTo(from, true); | |
| } | |
| }, 1000); | |
| document.getElementById("movie_player").seekTo(from, true); | |
| document.getElementById("movie_player").playVideo(); | |
| } | |
| const from = 0; | |
| const to = 0; | |
| ytLoop(from, to); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment