Created
December 2, 2012 22:53
-
-
Save kylestev/4191441 to your computer and use it in GitHub Desktop.
This is for acquiring the "OrderedFriends" list that is rumored to tell you who visits your profile the most. This is more likely fiction than fact, though.
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
| function getScriptIndex() { | |
| for (var i = 0; i < scripts.length; i++) { | |
| if (scripts[i].innerText.indexOf("OrderedFriends") > -1) { | |
| return i; | |
| } | |
| } | |
| return -1; | |
| } | |
| var sindex = getScriptIndex(); | |
| if (sindex > -1) { | |
| var script = scripts[sindex].innerText; | |
| var findex = script.indexOf("OrderedFriendsListInitialData"); | |
| var ids = JSON.parse(script.substring(findex + 42, script.indexOf("]", findex + 50) + 1)); | |
| console.log(ids); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment