Skip to content

Instantly share code, notes, and snippets.

@ibolmo
Last active March 25, 2016 18:56
Show Gist options
  • Select an option

  • Save ibolmo/7808520b7ba5ea59a7fb to your computer and use it in GitHub Desktop.

Select an option

Save ibolmo/7808520b7ba5ea59a7fb to your computer and use it in GitHub Desktop.
/*
Instructions:
1. Copy from line 8 to the end, into a new bookmark "Select all". The url is all the code below. It'll work (trust me).
2. In Facebook, open the event and Invite > Choose friends
3. Scroll down to load more of your friends.
4. Click on the "Select All" bookmark. You should see the friends being selected. It'll take a while, but it'll finish.
*/
javascript:(function(){
var DELAY = 250;
var found = document.querySelectorAll('a[aria-checked="false"]');
var i = 0, el;
var click = function(){
if (el = found[i++]){
el.click();
setTimeout(click, DELAY);
}
};
click();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment