« Home | digg.com has perhaps the weirdest crowd online » | The RIAA are fuckin nuts » | SomaFM needs your support » | Three worst movie titles » | Guitar tabs and lyrics are now illegal ??? » | For all Tintin fans » | And yet again » | What a retarded article » | Why are Subcontinent addresses so long? » | GoEar - the Youtube for audio/music »

The Facebook profile pic hack - reloaded

This was originally posted on my facebook profile's notes section, but is reproduced here with a bugfix and made easier to use for the benefit of mankind.
Here's a neat Firefox trick to view someone's profile pic (or another photo) in full size even when they are not in your friends list.

So here goes:
Simply drag and drop the following link to your bookmarks toolbar:
View Full Pic.

Note: If you are viewing this in Facebook, please click View Original Post and then drag the link from there instead. Facebook adds its own stupid link tracking so dragging directly from here won't work.

That's it. From then on if you wish to view the full profile pic, just right click the thumbnail > View Image > and click the View Full Pic bookmark on your toolbar.

This should also work in Internet Explorer (and maybe any other browser, but I have not tested). Firefox just has the View Image option making everything much easier.

How it works

As everyone (perhaps?) knows, to view profile pics of people not in your friends list or network, all you gotta do is (in Firefox) right click the little thumbnail of the photo and choose View Image. It opens up the same image. Now to view the full size pic, you have to change the /t130139303 (or whatever the number is) to /n130139303, in the location displayed in your address bar.

This is a hassle, so we create a bookmarklet to do the search/replace for us. Here's the code:
javascript:window.location.href=window.location.href.replace(/\/[t|s](.*)jpg$/,"/n$1jpg");

The regex has [t|s] because there are two versions of a thumbnail on facebook, a 't' (tiny) one and an 's' (small one). The full pic is 'n' (normal). Yes, I know the regex is not comprehensive and will match any URL which ends in a .jpg file whose filename starts with 't' or 's' but who the F cares when it works on facebook just fine - simply don't click the bookmarklet while on other sites to avoid running into 404 Page Not Found's and other side effects.

Let's see if I can whip up a Firefox extension to make it even less work.

PS: In case you are wondering about my motivation (you perverts), it was a 'side effect' while I was trying to muck with the commenting system on digg.com. Apparently digg is quite secure (so far) and I didn't get anywhere but the idea worked on facebook for now.