Skip to content

Instantly share code, notes, and snippets.

@Vintharas
Forked from mzabriskie/random-attendee.js
Last active April 5, 2017 08:57
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 Vintharas/e8197a4baebb33bcefe26e1694a8010a to your computer and use it in GitHub Desktop.
Save Vintharas/e8197a4baebb33bcefe26e1694a8010a to your computer and use it in GitHub Desktop.
Select random Meetup attendee
// Create bookmark with javascript: CODE_HERE
// Click on bookmark in meetup website
(function () {
var list = document.getElementById('rsvp-list').children,
item = list[Math.floor(Math.random() * list.length)],
name = item ? item.querySelector('h5.member-name a').innerHTML : 'N/A';
item && item.parentNode.removeChild(item);
alert("And the winner!!! Is.... " + name);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment