Skip to content

Instantly share code, notes, and snippets.

@alexander-danilenko
Last active November 1, 2020 13:34
Show Gist options
  • Save alexander-danilenko/1d595ca0dd3eb25a47b310d62c068f43 to your computer and use it in GitHub Desktop.
Save alexander-danilenko/1d595ca0dd3eb25a47b310d62c068f43 to your computer and use it in GitHub Desktop.
nnm-club.me liker
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