Created
June 6, 2016 08:04
-
-
Save JohnCoates/b3c13def927d7dc0c5c03c0e6c61ebba to your computer and use it in GitHub Desktop.
Auto-tap load more on YouTube
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
buttons = document.getElementsByTagName("button"); | |
for (key in buttons) { | |
button = buttons[key]; | |
attributes = button.attributes | |
if (attributes != undefined && attributes.getNamedItem('aria-label')) { | |
label = attributes.getNamedItem('aria-label') | |
value = String(label.value) | |
if (value == "Load more\n") { | |
console.log("clicking load more!"); | |
button.click(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment