Skip to content

Instantly share code, notes, and snippets.

@feload
Created July 16, 2018 14:12
Embed
What would you like to do?
Auto-dislike for facebook.
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