Skip to content

Instantly share code, notes, and snippets.

@cyanboy
Created June 17, 2014 14:40
Show Gist options
  • Save cyanboy/0a33c108372ae515f85f to your computer and use it in GitHub Desktop.
Save cyanboy/0a33c108372ae515f85f to your computer and use it in GitHub Desktop.
All all friends on search page BuckysRooom
//Run this code in the developer console of your browser
var links = document.getElementsByTagName('a'); //Get array of all links
for (var i = 0; i < links.length; i++) { //Loop through all links
if (links[i].innerHTML == "Send Friend Request") {
links[i].click()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment