I was going to write myself a little Firefox extension just now. A teeny tiny textbook example of an extension to add a single item to the right-click menu. I wanted to be able to view an image in a new tab and others agreed this would be a sensical addition, so I started googling for HOWTOs and docs. It didn't take long to find pretty much exactly what I wanted because everyone seems to use this very action (menu modification) as the example of how to write an extension.
I grabbed a FF nightly, modified its registry to point to the unzipped versions of the chrome jars, and dug into the code. Finding the right starting point wasn't difficult, and I was just getting warmed up and about to make a first simple edit just to replicate the "View Image" entry and change its label, when I noticed this line in its stanza:
onclick="checkForMiddleClick(this, event);"
Why would a context menu entry be middle-click sensitive? The only thing middle-click does in Mozilla is...open...things in...new tabs. Hmm.
Right-click; middle-click; BING!
Dang, I was looking forward to writing that and learning something new.