Skip to main content
xenoveritas.org

Main navigation

  • Categories
  • Home
  • Links
  • Name Generator
  • Scramble
User account menu
  • Log in

Breadcrumb

  1. Home

Creating Firefox Extensions

By Xenoveritas, 13 January, 2005
Topics
Firefox
  • Add new comment

OK, this is one of those "to be edited later" posts, but it's a start at writing a real quick tutorial on how to write a Firefox extension.

Settings Up Firefox

Before writing any code, we need to set up Firefox to make debugging an extension more possible. I mean, we could conceivably skip these steps, but then debugging anything would be a giant pain.

Anyway, first things first. Copy your Firefox shortcut or launcher or whatever you use for your system. Edit it and add "-console" to the command that starts it. So Windows users will wind up with something like:

"C:\Program Files\Mozilla Firefox\firefox.exe" -console

That will enable the console window to appear when you run Firefox, which will display console messages that you can create using "window.dump()" from within your JavaScript code. Of course, that doesn't actually enable window.dump(), so you won't see anything yet.

The next step is to pop over to about:config and right click on it to add the following key: "browser.dom.window.dump.enabled" Set that to "true."

Unfortunately, JavaScript errors in your extension will still be silently absorbed. So now filter on "javascript.options.showInConsole" and set that to true.

You've now got Firefox in configured so that it makes it much nicer for development. You can write debugging messages using window.dump() and find JavaScript errors in the JavaScript console.

I'll update this with more at some later point.

Current Games

I'm currently playing:

  • Final Fantasy XIV: Endwalker

I intend to maybe get around to finishing:

  • Literally anything else

Video Games Section

Thought for the Moment

I never have thoughts any more.

Old Thoughts

Has the LHC Destroyed the Earth?

  • Create new account
  • Reset your password
RSS feed
Powered by Drupal