Skip to content

Instantly share code, notes, and snippets.

@bobwei
Created June 14, 2019 07:37
Show Gist options
  • Save bobwei/421d759fdf3f964d809ed53dfc14efec to your computer and use it in GitHub Desktop.
Save bobwei/421d759fdf3f964d809ed53dfc14efec to your computer and use it in GitHub Desktop.
const $el = $0;
const nLikes = 1000;
const delaySecs = 1;
[...new Array(100)].reduce((acc) => {
return acc.then(
() =>
new Promise((resolve) => {
$el.click();
setTimeout(resolve, delaySecs * 1000);
}),
);
}, Promise.resolve());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment