Skip to content

Instantly share code, notes, and snippets.

@mistermark
Created November 29, 2013 12:28
Show Gist options
  • Save mistermark/7705008 to your computer and use it in GitHub Desktop.
Save mistermark/7705008 to your computer and use it in GitHub Desktop.
Grab all names of your friends in a list and create an array out of them to use for further functions. Open up the list and click "Manage List" > "Edit List". Then run this script in the browser console.
var items = [],
textItems = [];
items.push(document.querySelectorAll(".friendListItem"));
for (var i = 0; i < items[0].length; i++) {
textItems.push(items[0][i].childNodes[2].textContent);
};
textItems;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment