GeekFindr: Firefox, view selection source
This is a feature I’ve been using for awhile now and it just occurred to me that it was a really great feature. In this day and age where javascript is used to place tons of html it can be a bit of a pain trying to figure out what is going on with your html. Sometimes there’s a third party widget I need to decode so that I can make my own form or otherwise customize the appearance - in the olden days it would involve finding the .js file and poking through the code to figure out what it’s doing. Best case, it’s a simply doc.write and you are just removing some code from the beginning or end of each line. Not so best case, there’s logic or obfuscation which results in white hair and throwing computers out of windows.
Naturally, this both ages you prematurely and costs a lot of money replacing your machines. Fortunately for everyone, Firefox - as usual - saves the day. Simply highlight the widget in your browser and then right click (or for you one button mouse people - ctrl-click) and choose “View Selection Source” and voila! You get a nice source page with the html that the script injected into the document in question. Easy as pie, no muss, no fuss.
Obviously, it’s also good if you just need to see a particular snippet of html, but this display of rendered javascript is really the cat’s meow. For javascript that prints an iframe (like google ads) you need to first right click somewhere in the ad and go to This Frame ->Show Only This Frame. That will pull up just the ad, then you can highlight and View Selection Source.
I can’t remember what life was like before there was Firefox - it’s so good in so many ways.








June 4th, 2007 at 4:45 pm
Hmph. I have seen this “Selection Source” option, but I have never ever used it. Thanks for the tip.
Amiri
August 13th, 2008 at 9:01 am
hi.. I use this view selection source option extensively and find it great.. Any idea how it is implemented???
Thanks for the info,
Siva
August 15th, 2008 at 9:16 am
Siva, I don’t know technically, but if I’d have to hazard a guess it’d be that FF pulls out the smallest enclosing DOM block and prints that. Could easily be wrong on that, though…