Skip to content

Instantly share code, notes, and snippets.

@yuurrraaaa
Last active December 25, 2023 08:48
Show Gist options
  • Select an option

  • Save yuurrraaaa/29b0c5ed4244f642c64f50e478d2694d to your computer and use it in GitHub Desktop.

Select an option

Save yuurrraaaa/29b0c5ed4244f642c64f50e478d2694d to your computer and use it in GitHub Desktop.
Youtube shorts auto scroller
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