Skip to content

Instantly share code, notes, and snippets.

@feload
Created July 16, 2018 14:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save feload/a0651396e71630641732f58539a454d9 to your computer and use it in GitHub Desktop.
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