Skip to content

Instantly share code, notes, and snippets.

@blackavec
Created November 12, 2018 13:35
Show Gist options
  • Save blackavec/59f95f3d301ad32ec1d8af9dd53c195e to your computer and use it in GitHub Desktop.
Save blackavec/59f95f3d301ad32ec1d8af9dd53c195e to your computer and use it in GitHub Desktop.
this script will start liking the profiles in a random time (human simulation) bases
window.startLiking = true
function getRandomArbitrary(min, max) {
return Math.random() * (max - min) + min;
}
function getRandomTime(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function likeIt () {
document.querySelectorAll('button[aria-label="Like"]')[0].click()
}
function start () {
setTimeout(() => {
window.startLiking && likeIt()
start()
}, getRandomTime(.5, 3) * 1000)
}
function stop () {
window.startLiking = false
}
function reStart () {
window.startLiking = true
}
// start it by calling start()
start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment