Opening Web Pages in Your Add-On

You might not realize it, but Firefox has some mouse shortcuts for when you are opening a web page from the bookmarks toolbar. If you hold down Shift when you click, the link opens in a new window. If you hold down Command or Ctrl when you click, the link opens in a new background tab. If you hold down Command or Ctrl plus Shift when you click, the link opens in a new foreground tab. So how do you honor these different options when you are opening web pages in your add-on? You use the function openUILink.

What Is Your Message?

A few months ago, I had lunch with Thom Singer*. Thom's an author and speaker and a really great guy. I met with him because I really enjoy public speaking and I wanted to talk to him about what it takes to be a professional speaker. We had a great lunch and a great conversation. In the end though, I decided that a career as a public speaker wasn't for me right now. The reason was because of one specific thing Thom said.

Running Add-on Code at First Run (and Upgrade)

Running code when your add-on is first installed or upgraded is pretty common. You might need to install a toolbar button or display a web page. I've seen a few different ways to do this, so I thought I'd show how I do it in my add-ons.

The best way to demonstrate this is with some sample code. I'll make some comments on at the end.

Stop Complaining and Do Something!

One of my personal goals this year is to stop being so negative. Looking back on my blog posts from last year, there were too many where I complained about things without offering good solutions. I even did it in an email this morning (sorry Jorge).

Complaining takes a lot more energy than actually doing something. Complaining drains your emotional, spiritual and physical energy.

So what can you do to stop a spirit of complaining?

The Firefox 4 Add-on Bar for Developers

As I mentioned last week, my posts will be a mix of Firefox add-on posts and personal posts. This one is about Firefox add-ons.

One of the new features in Firefox 4 is the add-on bar. Love it or hate it, as an add-on developer, you're going to have to get used to it. I recently ported one of my add-ons that has a status bar icon over to use the add-on bar, so I thought I would share the experience. This post assumes that you have built a Firefox add-on before and are porting it over to Firefox 4.

Embracing the Change

When I first made the decision to take a leave of absence from IBM and go out on my own (before I was laid off), one of my primary motivations was that to stay at IBM I would have to completely change my career path. That path would have moved me away from working primarily on client software (which I'd done since I started at IBM) to working primarily on server software. At the time, this type of work didn't really appeal to me.

But the truth is there was one motivator behind my final decision:

I didn't want change.

Writing a Firefox Protocol Handler

So my plan for this year, in addition to posting more, is to alternate posts between Firefox related and non Firefox related. This one is Firefox related. Hopefully you'll find it interesting either way.

Have you ever thought about the things you type before the colon (:) in your browser? Like http, https, ftp or file? These are called schemes or protocols. Firefox add-ons can add new schemes or protocols to the browser. This post will show you how to do that. We're going to assume you have a basic knowledge of JavaScript, but have never written a Firefox add-on.

What are You Shipping in 2011?

As I was putting together What I Shipped in 2010 in response to Seth Godin's question, I discovered a few things about myself that probably apply to you.

  1. By the end of the year, I've forgotten the first three quarters of the year.
  2. A major negative event (or maybe positive) divides your year. In my case, it was very difficult to see things before that event because that event defined my year
  3. If it weren't for Facebook and Twitter, I'd probably have no record of my year.

Why's it so important to keep track of the things that you've shipped?