Skip to content

Instantly share code, notes, and snippets.

@zivc
Created October 5, 2014 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zivc/ae691da2e89dab8cb153 to your computer and use it in GitHub Desktop.
Save zivc/ae691da2e89dab8cb153 to your computer and use it in GitHub Desktop.
Invite all friends to an event on Facebook javascript
/*
Scroll to the bottom of the lazy loading list and then put this in your console
*/
[].forEach.call(
document.querySelectorAll('.multiColumnCheckable.checkableListItem'),
function(friend) {
if (friend.className.indexOf('disabledCheckable')<0) { // check to make sure that they're not already invited
friend.click();
}
}
);
@rozziecole
Copy link

It did not work - returned "undefined"

[].forEach.call(
document.querySelectorAll('.multiColumnCheckable.checkableListItem'),
function(friend) {
if (friend.className.indexOf('disabledCheckable')<0) { // check to make sure that they're not already invited
friend.click();
}
}
);
undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment