Firebug Lite *does have* a content script. Before the modifications I made, the firebug.js script contained both the "content script code" and the "page code" (the giant "firebug" function defined at the very beginning was being injected as a string in the page, installing Firebug Lite at the page). Now the firebug.js contains only the content script and the injected script is an external file.
The Chrome's extension files now are:
background.html - background page
firebug.js - content script (now acting as a simple Browser Helper Object)
firebug-lite-beta.js - Firebug Lite application (will be running on a page)
googleChrome.js - Firebug Lite application module for Google Chrome specific code (will be running on a page)
So now it is easier to change Chrome's extension code. You probably will have to change only the background.html, firebug.js and googleChrome.js files (which are small files), and you won't have to change the huge file (the 930k firebug-lite-beta.js file).
Note that the googleChrome.js file will be later moved from /build/chrome-extension-beta/ to other place (to be defined) such as /content/firebug/ or /platform/google/. I need to discuss this with the Firebug Working Group.
I placed some comments in the code (// TODO) so you can see what else need to be handled now. Context-menu actions are working now, but only when Firebug Lite is both activated and open. There are also a couple of other minor things. Here's the list of the ones I could find:
1. If FBLite is *activated* but *not open* (i.e. it is minimized) and a context-menu click happens, it should
open Firebug
Lite's UI, and only later Inspect the element.
2. If FBLite is *deactivated* and a context-menu click happens, it should activate Firebug Lite first, wait the activation to finish, open Firebug Lite's UI, and only later Inspect the element.
3. The same #1 logic applies to CTRL+SHIFT+C but the triggered action will be start inspecting the element.
4. The same #1 logic applies to F12 but the triggered action will opening Firebug Lite's UI (or opening in a new window if CTRL+F12 was pressed).
5. The oncontextmenu event attached to page should be removed when the page is unloaded.
6. The keyboard event that will be attached to page should be removed when the page is unloaded and/or when Firebug Lite is activated.
You'll probably find more issues along the way, but I'm here to help. If you need something that requires changing Firebug Lite's app, let me know. Since this is you first adventure in Firebug's code you'll find it difficult to detect which lines to change in the huge file (the firebug-lite-beta.js shouldn't be changed directly anyway, it is a build file containing all Firebug Lite modules in one single file). I guess you'll need a hook to detect when Firebug Lite's activation was successfully completed.
By the way, please remember to update you copy Firebug Lite's code to be sure you get the most recent one:
http://fbug.googlecode.com/svn/lite/branches/firebug1.4/build/chrome-extension-beta/
regards,
Pedro Simonetti.