Delicious Delicacies for Firefox 1.5

November 23rd, 2005

Mook and I updated the Delicious Delicacies extension for Firefox 1.5. The extension had to be largely rewritten because the Firefox Options window was rewritten for Firefox 1.5, so this version of the extension won't work in Firefox 1.0.x.

New user script: Bug attachment source

November 8th, 2005

I've been working with crash bugs in Firefox a lot lately, so I wrote a Greasemonkey script called Bug attachment source to make it easier to view the source of a Bugzilla attachment that would crash the browser if loaded normally. It adds a "source" link next to the mime type of attachments, except for text/plain attachments such as patches.

I have only tested it with Greasemonkey 0.6.3 and today's Firefox build from the Firefox 1.5 branch.

Need icons?

November 4th, 2005

jesus_X, who made the icons for my Thumbs and How'd I Get Here? extensions, is now offering to make icons for other artistically challenged extension authors.

Extension ideas

November 3rd, 2005

I have a bunch of ideas for extensions. I'll blog about a few in detail, but here are the ideas I can describe in one or two sentences.

Find and search

  • Improve Find by showing the locations of matches on the scrollbar (like some IDEs) (bug 259640).
  • Automatically turn frequently used "I'm Feeling Lucky" address bar searches into keyword bookmarks, which are faster and don't change unexpectedly.
  • Highlight Google search terms in a page you reached by clicking a Google search result.

Removing web annoyances

  • DisableAutoRefresh (like RefreshBlocker) but only for refreshes to the same URL or refreshes longer than 30 seconds.
  • Disable insecure connections to certain hostnames (e.g. mail.google.com), redirecting to https if possible.
  • Show onclick events (bug 229055).

Keyboard shortcuts

  • Make Alt+D always work to focus the address bar (ignore accesskey="D").
  • One-handed shortcuts (single-key shortcuts, or not).
  • Assign keyboard shortcuts to bookmarklets.
  • Ctrl+Alt+click to save images.

Other

  • Patch manager for installing patches to browser chrome or JavaScript components.
  • Show favicon in title bar for trusted sites.
  • Edit this page with NVu.
  • Warn me if I load Slashdot too many times in an hour.
  • Caps lock warning (oops, already exists).
  • QuickLaunch: stay in memory even after the last window is closed on Windows.
  • Dump all open urls to clipboard or text file (bug 33328).
  • Tab Manager (list of tabs and windows) (bug 159853).
  • Back to previous site (like "Rewind" in Opera) (bug 182138) (DomNav sorta something like this but with a user interface I don't like).
  • User stylesheet manager (like Greasemonkey but for user stylesheets) (hint: use user stylesheet API and site-specific rules). Stylish
  • Planet-like view of feeds to which I am subscribed.
  • Right-click any form control, "Set as default". (For example, I should be able to set a default departure city on southwest.com and a default zip code on weather.com.)
  • Automatically correct dumb typos in the address bar (e.g. "google.cmo") (bug 175634). URL Fixer
  • Automatically back up text typed into textareas. Built into Firefox 2.
  • Ajaxify Bugzilla.

For more ideas, see the comments on my October 2004 post, Request for extension ideas. Feel free to base extensions on these ideas, but I'd appreciate a mention on the home page for your extension if you got the idea from me.

Update 2007-06-01: Crossed out three of the ideas, since I've seen extensions that do those things or Firefox now does those things.

IRC channel for extension developers

November 3rd, 2005

I created #extdev on irc.mozilla.org as a place for Firefox and Thunderbird extension developers to discuss ideas for extensions, ask for help, and tell each other to RTFM.

New features for extension developers in Firefox 1.5

November 3rd, 2005

SVG support

SVG is W3C specification providing resolution-independent scalable vector graphics, along with a DOM. Firefox 1.5 supports a subset of SVG 1.1. For more information, see SVG in DevMo.

Canvas Support

<canvas> is a scriptable bitmap drawing surface. It is suitable for many uses, such as drawing dynamic graphs and game graphics. For more information, see Drawing Graphics with Canvas or the Canvas tutorial.

Hidden referrer column for history

Extensions can now access the referrer information for pages stored in the browser history. This feature can be used to provide alternate history views and other useful functionality. For example, my How'd I Get Here? extension uses this feature.

API for prioritizing HTTP connections

The Mozilla networking library now supports the prioritization of connections to a specific server. (See nsISupportsPriority.)

API for configuring proxies

It is now possible for extensions to easily override the proxy configuration without affecting user-visible preferences. (See nsIProtocolProxyService, nsIProtocolProxyFilter, and nsIProtocolProxyCallback.)

API for managing user and UA stylesheets

Extensions can now register stylesheet URIs as additional user and UA stylesheets. This means extensions no longer have to try to edit userContent.css to add styling (say for XBL binding attachment) to web pages. This makes it easier to implement extensions like Flashblock. For details on using this API, see Using the Stylesheet Service.

Site-specific user style sheet rules

Firefox now supports site-specific user style sheet rules. While advanced users can edit userContent.css to use this feature directly, an extension could also take advantage of this feature using the API for managing user style sheets above.

Dynamic Overlays

Loading of XUL overlays after the document has been displayed is now supported. (See nsIDOMXULDocument.)

Translucent Windows (Windows/Linux)

On Windows and Linux, XUL windows with a transparent background are now supported. This allows whatever is below the window to shine through the window background.

New Preferences Bindings

These new bindings make it easier to create preferences windows for extensions. The new preferences windows support instant-apply behavior, which is enabled by default on Mac and Linux.

API for implementing new command-line switches

An extensible API has been introduced so that extensions can easily handle complex command-line flags. (See nsICommandLine and nsICommandLineHandler.)

XTF Support

The eXtensible Tag Framework allows adding support for new namespaces using XPCOM components to Mozilla (written in JavaScript or C++). For example, the Mozilla XForms Project uses XTF to add support for the XForms namespace. See the XTF Home Page.

Cryptographic hash API

Extensions now have access to several cryptographic hash functions, including MD5, SHA-1, and several flavors of SHA-2. (See nsICryptoHash.)

Rich list box

<xul:richlistbox> is a new widget that Firefox's Download Manager and Extension/Theme manager now use. For more information, see XULPlanet: richlistbox or DevMo: richlistbox.

Access to nsIEditor of textboxes

Firefox now has a supported method for getting the nsIEditor of textboxes and textareas, making it easier to implement features such as spell checking for web forms. For more information, see bug 303727 or nsIDOMNSEditableElement.

Access to nsIPipe

See bug 300423 or nsIPipe.

Other improvements

This post emphasizes new features since Firefox 1.0.7 over things that have changed since Firefox 1.0.7, but here are a few important things that have changed:

  • Improvements to evalInSandbox make it easier for extensions like Greasemonkey to inject scripts into web pages safely.
  • Improvements to designMode (WYSIWYG HTML editing) make it more suitable for use in extensions.
  • Extensions can now include search plugins, plugin DLLs, and platform-specific XPCOM components.
  • Extensions can now add to the user-agent string in a safe way.
  • There are now extra ways to install and uninstall extensions, especially Firefox extensions that are shipped with Windows programs.
  • New JavaScript language features allow extension developers (and web developers who only target Firefox) to manipulate arrays and XML concisely.
  • There have been many changes in XUL, especially to the XUL tree widget.
  • Extensions written using JavaScript now use XPCNativeWrappers by default, making it easier to write extensions that manipulate web content without introducing security holes.
  • Extensions can now specify that they are compatible only with specific versions of Firefox (e.g. Firefox 1.5.0.2). Most extensions that work with Firefox 1.5 should set their maxVersion as 1.5.0.*, indicating that they will work with future security releases (unless some of those releases contain API changes, which is unlikely and will cause them to be numbered e.g. Firefox 1.5.1). See this page for more information.

Parts of this post were taken from this page, which was based on a wiki page, which was based on an early version of my changelog for Deer Park Alpha 1. It might be merged with this wiki page in the future.

Extend Firefox contest

November 3rd, 2005

Since I work for the Mozilla Corporation, I can't enter the Extend Firefox contest. Instead, I'm going to post a few things to help extension developers submit good entries help you win:

JavaScript Shell 1.4

October 30th, 2005

Changes since JavaScript Shell 1.3.1:

  • Up/down now navigate history as long as the caret is within the first/last line of the input. (Previously, the caret had to be at the beginning of the first line or the end of the last line.)
  • Navigating to the previous history entry now puts the caret at the end of the textarea.
  • Added tooltips for the links with accesskeys at the top of the page. (Fixed by Jesper Rønn-Jensen.)
  • Added overflow: auto; to the input field to prevent scrollbars from appearing in IE unnecessarily.
  • Alphabetize properties in props() output.
  • Added a hidden option for props() to print one property per line (pass true as the second parameter to props()).
  • props() now complains if you pass undefined or null.
  • Tab completion no longer causes an error in IE. (Fixed by Jesper Rønn-Jensen.)

Updated shell, updated bookmarklet, diff