Skip to content

Instantly share code, notes, and snippets.

@sayhicoelho
Last active January 25, 2018 00:37
Show Gist options
  • Save sayhicoelho/e71565cc164d2c0e0a8dfa52a90c9565 to your computer and use it in GitHub Desktop.
Save sayhicoelho/e71565cc164d2c0e0a8dfa52a90c9565 to your computer and use it in GitHub Desktop.
Facebook: The easiest way to accept all of friend request list
var interval;
var scrollInterval;
var index = 0;
var container = document.querySelector('.mtl._30d._5ewg._5n-u > div:nth-child(3) > div');
interval = setInterval(function () {
var friendRequests = container.querySelectorAll('.friendRequestItem');
var button = friendRequests[index].querySelector('button.selected');
button.click();
index++;
}, 500);
scrollInterval = setInterval(function () {
container.scrollTop += 100;
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment