Auto-dislike for facebook.
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 dislike = (el) => { | |
return new Promise((res, rej) => { | |
el.click(); | |
setTimeout(() => { | |
document.querySelector('a.itemAnchor').click(); | |
setTimeout(() => { | |
res(); | |
}, 1000); | |
}, 2000); | |
}); | |
} | |
async function run (coll) { | |
for (let el of coll) { | |
await dislike(el); | |
}; | |
} | |
const coll = document.getElementsByClassName('PageLikeButton'); | |
run(coll); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment