Archive for February, 2007

Changing the order of UI elements in a user style

Monday, February 19th, 2007

Chrome user interface can be modified in more ways than that of web pages. Since CSS has to be used for, well, everything, some special properties were invented. A couple of the special properties actually let you change the order in which elements are rendered, regardless of where they are in the source. These properties […]

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