-
-
Save gianu/9071417 to your computer and use it in GitHub Desktop.
one liner to log to console a random element from the meetup.com attendee list.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy-paste into console | |
console.log(Array.prototype.slice.call(document.querySelectorAll("#rsvp-list h5 a"),0).sort(function () { return Math.random() -0.5; })[0].innerHTML); | |
//click on the link to the profile |
A much better alternative:
var element = Array.prototype.slice.call(document.querySelectorAll("#rsvp-list h5 a"),0).sort(function () { return Math.random() -0.5; })[0]; console.log(element.href + " : " + element.innerHTML);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A good alternative is to call:
You can have multiple members with the same name, but the link is unique (or should be at least 👅 )