Introducing Operator, a Microformat Detection Extension for Firefox 2
Today Mozilla Labs is releasing Operator, a microformat detection extension developed by Michael Kaply at IBM. Operator demonstrates the usefulness of semantic information on the Web, in real world scenarios.

Here are some examples of things you can do with this release of Operator, and with the Web as it exists today.
Yahoo! Local
Your Address Book
With Operator you can send the phone number of your favorite pizza place from Yahoo! Local to your address book, without having to type anything. Click through for the full image:
If you view an event at Upcoming.org you can easily add the event to your calendar to see if you are free, or map the location of the event to see where it will take place.
Let’s say you are viewing Fred’s post about the Mozilla lanyards given out at the Firefox Summit, and you decide you want to view more photos of the Firefox Summit. With Operator, you can easily navigate from Fred’s post to the “Firefox Summit” tag on Flickr.
Now let’s say you want to know where the above picture was taken. Because the photograph is geotagged, you can use Operator to quickly push its’ coordinates to Google maps.
This works for any of the millions of geotagged pictures on Flickr.
Operator requires information on the Web to be encoded using microformats, and since this method for semantically encoding information is relatively new, not all sites are using microformats yet. However, Operator works great with any blog that uses rel-tag, and the sites Yahoo! Local, Flickr, and Upcoming.org, all of which contain millions of pieces of information expressed using microformats. As more sites begin to semantically encode data with microformats, Operator will automatically work with them as well.
If you are not familiar with microformats, Alex Faaborg has been posting about microformats throughout the week. These posts serve as a good introduction:
Operator isn’t the first microformat detection extension for Firefox, previously microformat detection in Firefox was possible with the Tails Export extension by Robert de Bruin. Operator builds on Tails Export by having a user interface that is based around actions the user can take, instead of data types. Operator also includes support for the microformats geo and rel-tag, and is compatible with Firefox 2.
After using Operator for awhile, you will find yourself quickly transferring structured data to your favorite applications without typing a single letter, you will be hoping around the Web without navigating on hyperlinks, and you will be remixing services in ways that are really useful.
The combination of microformated content on the Web and the Operator extension for Firefox results in a kind of data cross pollination that we think is very exciting.
Operator as Tool for Adding Microformated Content to Your Web Site
[Update: Additional technical information about Operator can be found on Michael Kaply’s blog]
In addition to demonstrating why microformats are important to end users, Operator can also be used as a tool for testing microformated content you have added to your Web site. Operator’s creator Michael Kaply explains:
In creating Operator my goals were to create something that was useful to microformat developers as well as users looking to explore microformats. As such, the Operator Toolbar can be displayed in two modes: Microformats mode and Actions mode.
In Microformats mode, each button on the toolbar represents a microformat. When you select an individual entry from the submenu on the button all the handlers available for that microformat are displayed. You can also change the options so that the default handler for that microformat is invoked when an individual entry is selected, as opposed to displaying all the handlers. In addition, you can choose to use a more descriptive name (for instance Contact(s) instead of hCard).

I have added some other useful features for developers. When you hold down the Shift key and select an entry in a microformats submenu, it displays the internal representation of the selected microformat item. When you hold down the Ctrl key and select an entry in a microformats submenu, it displays the source of the selected microformat item. Also, if debug mode is turned on in options, when an invalid microformat is detected, the menu text is changed to “Invalid - select for more details.” If you select the menu item, it will give you a message indicating what we believe is incorrect about the entry.
The Operator extension is also very extensible, allowing for not only the creation of additional microformats, but also the addition of handlers to existing microformats. There are sample files provided in the directory where the extension is installed for both of these cases. To use the new microformat or handler, place it in a directory called “microformats” in your profile directory.
I know I will get a few questions about some things, so I thought I’d handle them here as well.
Q: Why didn’t you use the XSLT transforms from Brian Suda to export to iCal and vCard?
A: Brian has done some great work, and I did take a look at those in the beginning but decided against them mainly because I needed more flexibility in my code to access the individual items in the microformats. Because of this, I parse the microformats myself and store the data in Javascript. Also, I wanted all the code in the extension to be original. I realize my export is not anywhere near as complete as Brian’s – that’s being worked on.Q: Aren’t the Tails and Tails Export extensions good enough? Why do we need more extensions in the microformat space?
A: The Tails and Tails Export extensions are great and they provided my first glimpse at using microformats in the browser. I quickly discovered though that the interfaces they provided (sidebar and status bar) were not what I was looking for and it was not easy to add custom handlers and microformats. My goal with this new work was to make it easy to tailor the microformat concept for the end user as well as provide more options for developers working on microformats.
Get Operator
You can download Operator at addons.mozilla.org.
Comments
If you are interested in commenting, please use this thread in mozilla.dev.apps.firefox, or comment below.
Technorati Tags: microformats
Today we are featuring a Firefox extension that Justin Dolske just whipped up called Chromatabs. It colorizes each browser tab to provide a strong visual indication of which site is loaded. Here’s a screen shot of it in action:

Let’s first take at the fundamental principle of why colors are useful. In the image below, try to do these two things:
1) Find all the red letters
2) Find all the K’s
You likely found the first task an order of magnitude easier than the second task [1]. This is because of difference in the way our visual system processes color compared to the way that it processes shapes. You can view all of the red letters with a single glance, or even spot them with your peripheral vision. Finding all of the K’s requires a close visual scan.
What does this have to do with tabbed browsing? Well, tabs use the same two visual variables (color and shape) to differentiate themselves from each other. Favicons provide a small amount of color, and the title text of the page consists of a series of shapes. Unfortunately some sites don’t have a favicon, or the favicon they do have isn’t sufficiently unique. Without favicons, you have to do a visual scan to find the correct tab — you can’t spot it with your peripheral vision.
This problem has attracted some interest from the community already. Many of you may be familiar with the popular Firefox extension Colorful Tabs. Its solution is to simply assign each new tab a color from a fixed list, in sequence. First example, the first tab will be blue, the second is yellow and the third green. The tab remains that color until it is closed. Each time you browse the web, you’ll have to remember what a particular color means at the moment:


Chromatabs’ approach to coloring tabs is different. Instead of assigning an essentially-random color to a tab when it is opened, a color is derived from the site currently loaded in the tab. For instance, this means that blog.mozilla.com will always be red, and engadget.com will always be purple:

So, how does it do that? Well… It takes the hostname from the URL, converts it to a number via a simple hash function, and then uses the number as a hue in HSL colorspace to obtain a final color. Justin has a blog entry discussing this and other technical details of Chromatabs’ operation in greater detail.
By keeping each site’s tab color consistent, the user can build up a mental model of what colors are associated with their favorite sites.
Future Work
Chromatabs was built as an experiment to test a concept. There are a number of directions someone could take this prototype to improve it and try new ideas. Here’s a few possibilities that might be interesting:
The Chromatabs extension is open source, so it’s a good starting point for anyone wanting to try out their own variation.
Discussion Topics
[1] From an HCI lecture (PDF) by professor Rob Miller
Laboratories are where science and creativity meet to develop, research, and explore new ideas. Mozilla Labs embraces this great tradition - a virtual lab where people come together to create, experiment, and play with new Web innovations and technologies. Read More »
Personas for Firefox is a prototype extension that adds lightweight theming to your browser. Read More »