Created
June 9, 2011 12:00
-
-
Save kopiro/1016593 to your computer and use it in GitHub Desktop.
Create a Mailist from Facebook findfriends browser
This file contains hidden or 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
javascript: | |
var dom = prompt("Insert domain name:","@domain.com"); | |
var names = new Array(); | |
var email = new Array(); | |
var divs = document.getElementsByClassName("friend_browser_page_name_box"); | |
for(i=0;i<divs.length;i++) names.push(divs[i].children[0].children[0].innerText); | |
for(i=0;i<names.length;i++) { | |
var cs = names[i].split(" "); | |
if (cs.length==2) { | |
email.push(cs[0]+"."+cs[1]); | |
} | |
else if (cs.length==3) { | |
email.push(cs[0]+cs[1]+"."+cs[2]); | |
email.push(cs[0]+"."+cs[1]+cs[2]); | |
} | |
} | |
var str = "" | |
for(i=0;i<email.length;i++) { | |
email[i] = email[i].toLowerCase()+dom; | |
str+=email[i]+","; | |
} | |
prompt("Here your mailist: ", str); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment