Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

mdxi (4658)

  (email not shown publicly)

Journal of mdxi (4658)

Saturday May 14, 2005
04:40 PM

Undocumented Features

[ #24693 ]

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 tabs. Hmm.

Right-click; middle-click; BING!

Dang, I was looking forward to writing that and learning something new.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.