Last active
August 4, 2025 19:23
-
-
Save 000hen/c32a90537a603dcf75b84f872e360f30 to your computer and use it in GitHub Desktop.
YouTube Shorts auto scrolling
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
| const vd = document.querySelector("video"); | |
| const btn = () => document.querySelector("#navigation-button-down button"); | |
| vd.removeAttribute("loop"); | |
| vd.onended = () => btn().click(); | |
| const observer = new MutationObserver((e) => vd.removeAttribute("loop")); | |
| observer.observe(vd, { attributes: true, attributeFilter: ['loop'] }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment