Skip to content

Instantly share code, notes, and snippets.

@voxxit
Created October 27, 2011 20:37
Show Gist options
  • Save voxxit/1320792 to your computer and use it in GitHub Desktop.
Save voxxit/1320792 to your computer and use it in GitHub Desktop.
Select all friends on Event creation page dialog on Facebook
var el = document.getElementsByName("checkableitems[]");
for (i = 0; i < el.length; i++) {
if(el[i].checked !== true){
var node = el[i].parentNode,
evt = document.createEvent("HTMLEvents");
evt.initEvent("click", true, true);
node.dispatchEvent(evt);
}
}
@voxxit
Copy link
Author

voxxit commented Oct 27, 2011

To use this:

  1. Open Google Chrome
  2. Go to the Event creation page.
  3. Open the "Select Friends" dialog.
  4. Scroll down so that all of your friends are loaded.
  5. Go to View > Developer > Javascript Console.
  6. Click the "Console" tab.
  7. Paste the above code. It should select all of your friends.

There you go! Enjoy ;)

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