Created
June 14, 2019 07:37
-
-
Save bobwei/421d759fdf3f964d809ed53dfc14efec to your computer and use it in GitHub Desktop.
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
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