Skip to content

Instantly share code, notes, and snippets.

@tomayac
Created May 29, 2015 12:41
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 tomayac/0788c9fdd5d391cd4d17 to your computer and use it in GitHub Desktop.
Save tomayac/0788c9fdd5d391cd4d17 to your computer and use it in GitHub Desktop.
Highlights a lucky random attendant who RSVP'ed to a meetup organized via www.meetup.com
// Test at http://www.meetup.com/Google-Developer-Group-Hamburg/events/222392017/
document.querySelector('#rsvp-list').querySelectorAll('li')
[
Math.floor(
Math.random() *
document.querySelector('#rsvp-list').querySelectorAll('li').length
) + 1
].style.backgroundColor =
'rgb(' +
(Math.floor(Math.random() * 256)) + ',' +
(Math.floor(Math.random() * 256)) + ',' +
(Math.floor(Math.random() * 256)) + ')';
@tomayac
Copy link
Author

tomayac commented May 29, 2015

Paste in the browser console and draw your lucky winner :-)

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