Update: A better version of what I was trying to do is here. It works around the cross-domain permission problems in IE by not loading a page in the frame, but putting there the actual content.
Firebug - no words to describe how cool it is, really. After the recent new release (1.0. beta) the number of features is overwhelming. I for one can't live anymore without it, seriously.
One of the things I noticed on the website is the ability to use the Firebug console in other browsers than Firefox. I don't know if this existed before version 1.0 but if it did, it was the best kept secret. I am so addicted to the console in Firefox, I use it all the time to tweak a few things here and there when I'm working on a page. Recently I was looking for something similar for IE, but couldn't find it. Lo and behold, it was right under my nose.
So, here's the page that describes how to use Firebug in IE (and others). Basically you unzip the Firebug Lite files somewhere on your server and then you include firebug.js in your pages. But why stop there? And isn't it possible to avoid including this script on every page (and forgetting to remove once you're done, or removing it prematurelly since a page, just like a painting, is never really finished). Bookmarklets to the rescue!
The solution I came up with is:
- you copy the Firebug Lite files somewhere on your server
- you call a bookmarklet that will load firebug.js
- you hit F12 and you have a console!
This procedure has to be repeated for every domain you're working on, because of the security policy that won't allow cross-domain frame scripting. You can have one copy for your http://localhost and one for every domain. To ease the creation of bookmarklets that load firebug.js, I came up with a Firebug bookmarklet generator.
- I copied Firebug Lite files (get the .zip) on this server (phpied.com), they are here.
- I (and you can try the same) generate a bookmarklet, using the bookmarklet tool
- Add the generated bookmarklet to the favorites
- Go to any page on phpied.com
- Click the new favorite
- Hit F12 to show/hide the console
Here's how (a readable version of) the generated code looks like:
Minor improvement to the console
The Firebug Lite console executes the code you type, but doesn't show it again when you use the up/down arrows, the way it does in Firefox. So I added this feature (copying from myself), you can replace the firebug.js you download with my version.
Not sold yet?
Here's a screenshot of the console in action, I used it to change my photo on the homepage.
Go ahead, please
I strongly encourage everyone to try this out. Firebug is a beautiful thing and using even a bit of it in IE is great.