Skip to content

Instantly share code, notes, and snippets.

@lubert
Last active August 7, 2019 01:35
Show Gist options
  • Save lubert/0641ccc6d73ffcb0223da2425ee74dd0 to your computer and use it in GitHub Desktop.
Save lubert/0641ccc6d73ffcb0223da2425ee74dd0 to your computer and use it in GitHub Desktop.
New Yorker voting script
window.found = false
for (let i =0; i < 500; i++) {
setTimeout(function() {
if (window.found) return;
if ($('#the_caption').text().includes('<MATCH>')) {
console.log("rank:", i)
$('.latest-button-wrapper span')[2].click()
window.found = true
} else {
$('.latest-button-wrapper span')[0].click()
}
}, 50 * i)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment