Last active
November 1, 2020 13:34
-
-
Save alexander-danilenko/1d595ca0dd3eb25a47b310d62c068f43 to your computer and use it in GitHub Desktop.
nnm-club.me liker
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
var timeout = 3000; | |
var nodes = document.querySelectorAll('input[type="image"]'); | |
var len = nodes.length; | |
nodes.forEach(function(el, index) { | |
setTimeout(function(){ | |
window.scrollTo({ | |
top: el.getBoundingClientRect().top + window.scrollY, | |
left: 0, | |
behavior: 'smooth', | |
}); | |
el.click(); | |
if(index == (len - 1)) { | |
alert('done'); | |
} | |
}, (index + 1) * timeout); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment