Created
December 22, 2013 23:21
-
-
Save r14c/8089638 to your computer and use it in GitHub Desktop.
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
// Facebook Profile Getter | |
// From Friend List | |
JSON.stringify(Array.prototype.slice.call($$('._698 img')).map(function (el) { | |
var parts = el.src.match(/(.*?\.net\/.*?)\/.*?\/([0-9]+_[0-9]+_[0-9]+_s\.jpg)/i); | |
return parts && [parts[1], parts[2].replace('s', 'n')].join('/'); | |
})); | |
// From Photos | |
JSON.stringify(Array.prototype.slice.call($$('._6i9 .tagWrapper i')).map(function (el) { | |
var url = el.style.background.match(/url\((.*?)\)/), | |
parts = url[1] && url[1].match(/(.*?\.net\/.*?)\/.*?\/([0-9]+_[0-9]+_[0-9]+_n\.jpg)/i); | |
return parts && [parts[1], parts[2]].join('/'); | |
})); | |
// ls | |
list.forEach(function (el) { | |
var a = document.createElement('a'); | |
a.href = el; | |
a.appendChild(document.createTextNode(el)); | |
document.body.appendChild(a); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment