isn't quite ashamed enough to present

jr conlin's ink stained banana

2008-08-07

::The Answer? Yes It Will

Hey, delicious user, Save This Page

::DOM it

A few quick tips about building extensions for Firefox that you won't (easily) find in the documentation:

  1. You do indeed need to create a devel profile that is stripped down and different from your normal profile. You also need to install Extention Developer (mostly for the XUL builder) and you absolutely need to install MozLab which will allow you to telnet into your browser and poke stuff. No firebug here folks, but MozRepl makes up for it.
  2. What you're looking for is called getBrowser() (or the gBrowser object). This is the unsafe pane. getBrowser().contentWindow.document is the document's DOM.
  3. Yes, there's an insane number of things you can do with the Components.classes stuff. That's all the XPCOM junk. Ignore it for now, it'll just distract you. (Ok Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService); gets you the Javascript Debugger Console, which is useful for dumping debug messages.)
  4. When specifying the stuff for the overlay you MUST match the id of what you're creating with whatever actually exists in the browser. (e.g. <toolbox id="navigator-toolbox"> for the toolbars at the top, or <statusbar id="status-bar" > for the, well, status bar. Messing that up will lead to much head poundery.
  5. Locale variables are a damn good idea… Which you can do once things are running.
  6. the 'DOMContentLoaded' event is your best friend that gets fired once the page DOM is completed.
  7. No, it's not your imagination. Mozilla is moving all the documentations inside of their wiki. Expect things to not be where you think they are nor where the documentation says they are. Yay you.

(Holy Crap! This is post 3000! And it would have gone up last night had my net connection not died.)

A few more tidbits of frustration interest:

  1. While it's possible to modify the content of an RSS file, any structural change results in losing the Pretty Print screen format
  2. Mouse events are relayed to the Chrome when you roll over elements in the RSS Pretty Print pane. Sadly, the events carry Zero information about what you've rolled over.
  3. There is an UNGODLY amount of Javascript available for perusal inside of the Chrome. A lot of it is well formatted so you can read it. It's also pretty obvious that it was written in various stages.
  4. i'm fairly sure that damn near anything you want to do is achievable via XPCOM interfaces. Sadly, those interfaces aren't horribly well defined. So expect to be dumping a lot of info to the Javascript Console.
Hey, delicious user, Save This Page
Blogs of note
personal that's my blog
(The Official Blog of the Internet)
memoirs of hydrogen guy matthew shepherd (quebec) rhapsodic.org j$ (right) Henriette's Herbal Blog fanatical apathy lynne ydw i iconophobia slumbering lungfish
geek Y!Cool Thing michael j radwin jeremy z
(The Official Website of the Internet)
dave's picks ultramookie Josh Woodward derek balling j$ (left) simon willison Yahoo! Search Blog
news ars technica search engine watch webmaster world.com
forums uh.net man-man killroy & tina

experimental

Firefox search plugins for Yahoo!

My Living Room media box config

The Official "Official" Registry of the Internet

Powered by WordPress
Hosted on Dreamhost.
And Steveo's page is Totally Fucking Awsome.