Last active
December 25, 2023 08:48
-
-
Save yuurrraaaa/29b0c5ed4244f642c64f50e478d2694d to your computer and use it in GitHub Desktop.
Youtube shorts auto scroller
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
| let buttonDown, newProgressValue, progressBar; | |
| let progressValue = 0; | |
| setInterval(function() { | |
| buttonDown = document.getElementById('navigation-button-down') | |
| progressBar = document.getElementById('progress-bar-line') | |
| newProgressValue = Number(progressBar.getAttribute('aria-valuenow')) | |
| if (newProgressValue < progressValue) { | |
| buttonDown.querySelector('button').click() | |
| progressValue = 0; | |
| } else { | |
| progressValue = newProgressValue | |
| } | |
| }, 1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment