Archive for the 'Mozilla' Category

Sumo forum feedback becomes forum idea list

Saturday, August 18th, 2007

Based on the feedback I’ve received, I’ve thrown together a list of features that I think (and hopefully you think) will make the sumo forums great. This isn’t finalized, so feel free to comment on that document or add any other ideas you may have.

Official Firefox support forums

Monday, August 13th, 2007

I’ve been contracted by Mozilla to help set up the forums for sumo, Mozilla’s upcoming official support offering. I’m quite excited by this, not only because I’m getting paid for something I’d do for free :), but also because my past experiences providing Firefox support have made me eager for a way to do things […]

Events don’t fire after customizing the toolbar?

Wednesday, July 18th, 2007

There used to be a bug in Gecko where calling removeChild on a node with an event listener attached makes the node lose the event listener. This bug is present in Firefox 2.0, but won’t be in Firefox 3.0. One unexpected result of this bug is that if the user customizes their toolbar, all event […]

Returning an array from a JavaScript XPCOM

Wednesday, May 9th, 2007

IDL
The second last word is the type of the objects in the array.
void getArray(out unsigned long count, [array, size_is(count), retval] out string retv);
XPCOM

getArray: function(count) {
var returnValue = [”foo”, “bar”, “baz”];
count.value = returnValue.size;
return returnValue;
}
Calling code

var xpcom = Components.classes[”@example.com;1″].getService(Components.interfaces.nsIExample);
var array = xpcom.getArray({});

Introducing YesScript

Friday, May 4th, 2007

YesScript is a JavaScript blacklist. It allows you to block specific websites from executing JavaScript. Unlike NoScript, YesScript isn’t meant to provide any extra security. It’s my opinion that Firefox is secure enough that a JavaScript whitelist like NoScript is at best unnecessary. YesScript is for preventing annoyances - certain sites abuse JavaScript by opening […]

Data URIs and XBL

Monday, April 30th, 2007

XBL lets you define behaviour by specifying a CSS property. Most of the time, these bindings define how controls act. In the case of user styles, they can do things like moving and removing elements (for ad blocking, for example). And just like people like to include images in their styles by way of data […]

Extension integration: It’s All Text!

Tuesday, March 13th, 2007

It’s All Text! is an extension that lets the user edit textboxes with their favourite editor. As was the case with Rainbowpicker, it has sensible default behaviour - it applies to all HTML text areas. Unlike Rainbowpicker, It’s All Text! has a well-defined, simple API to extend its functionality into other areas.
We must load […]

Extension integration: Rainbowpicker

Friday, March 9th, 2007

This is the first in a series of posts about integrating extensions with other extensions. That is, providing advanced functionality in your extension based on the presence of other extensions.
Rainbowpicker is an extension that changes the way XUL colorpickers work - for button type colorpickers, instead of the default behaviour where a drop down is […]

Opening links from menus, the right way

Tuesday, February 6th, 2007

Here’s what I currently do to open a link from a menu, respecting what the user actually wants to happen and without repeating code.
<!– … –>
<menuitem oncommand=”myExtension.foo(event)” onclick=”checkForMiddleClick(this, event)”/>
<!– … –>
/* … */
foo: function(event) {
myExtension.openURL(event, “theKey”);
},
openURL: function(event, key) {
openUILinkIn(myExtension.urlStrings.getString(key), whereToOpenLink(event));
},
/* … */
What to take note of:

openUILinkIn, whereToOpenLink, and checkForMiddleClick are part […]

Avoiding extension conflicts

Tuesday, February 6th, 2007

Problems that occur when two specific extensions are installed are difficult to debug. You often won’t see the problem yourself, it’ll be some user reporting it. You have to lasso them long enough to figure out that that indeed is what’s happening rather than some system-specific or a difficult-to-reproduce bug. Once the conflicting extension is […]

Adventures in development - Web standards and Firefox extensions