Skip to content

Instantly share code, notes, and snippets.

@NeilHanlon
Created December 1, 2012 09:13
Show Gist options
  • Save NeilHanlon/4181240 to your computer and use it in GitHub Desktop.
Save NeilHanlon/4181240 to your computer and use it in GitHub Desktop.
document.body.innerHTML = document.body.innerHTML.toString().match(/\[\"OrderedFriendsListInitialData\"\,\[\]\,\{\"list\"\:\[\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"\,\"([0-9]*?)\"/g)[0].replace(/\[\"OrderedFriendsListInitialData\"\,\[\]\,\{\"list\"\:\[\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"\,\"([\d]*?)\"/g,'<a href="http://facebook.com/$1">$1</a><br><a href="http://facebook.com/$2">$2</a><br><a href="http://facebook.com/$3">$3</a><br><a href="http://facebook.com/$4">$4</a><br><a href="http://facebook.com/$5">$5</a><br><a href="http://facebook.com/$6">$6</a><br><a href="http://facebook.com/$7">$7</a><br><a href="http://facebook.com/$8">$8</a><br><a href="http://facebook.com/$9">$9</a><br><a href="http://facebook.com/$10">$10</a><br>');
@NeilHanlon
Copy link
Author

Usage:

Chrome:

  1. On Facebook.com, right click on the page, and select "Inspect Element".
  2. Select Console from the top of the box that will appear.
  3. Paste the javascript code into the console, and press enter.
  4. Don't be freaked out when facebook disappears. Just refresh the page to get it back.

Firefox: (latest version?)

  1. Press Ctrl+Shift+K
  2. This opens a javascript console. Paste the javascript code in, and press enter. See step 4 above.

Safari should be the same as chrome

I'm not providing instructions for IE...

If all else fails, typing "javascript:" (sans quotes, replacing with the javascript code), into your address bar while on facebook and pressing enter has the exact same effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment