Kilian Valkhof

Building tools that make developers awesome.

Yoda and binary in Firefox with Ubiquity

Javascript, 2 March 2009, 2 minute read

A couple of weeks ago I made two Ubiquity commands: A binary (and back) translator, and a Yoda speak translator. While perhaps not particularly useful, they were a lot of fun to make and use, and got me acquainted with the process of building a Ubiquity command.

Ubiquity? #

Ubiquity is quickly becoming my most used Firefox extension. I love it. If you are familiar with Gnome-do (Linux), Quicksilver (Mac) or Launchy (Windows) then you already know how powerful a keystroke launcher is. Ubiquity is such a keystroke launcher for the internet. For a great overview, read this article by Ryan Carson.

Ubiquity commands are basically Javascript, but Ubiquity provides some handy additional options to make it very easy to use (and also, you get to write Javascript for just one browser, yay!). They have an excellent tutorial available here: Ubiquity Author tutorial.

Binary #

A while ago xkcd posted this comic which features a bunch of binary. Unlike some people, I can’t read binary, so I set out to find a binary translator for Ubiquity. Turns out there wasn’t one! So I immediately promised to make one that weekend, which I didn’t. Instead I made it a weekend later.

Download the Ubiquity binary command here

You can also try it out on that page, or out in the wild, for example with Google’s first Twitter message.

Yoda speak #

Now, It might not be much of a surprise that I am a huge Star Wars geek. Dutch television recently aired all Star Wars movies, and during The Empire strikes back, Leon ported the Yoda speak translator to Ruby. Realizing how awesome it would be to use that in your browser as well, I immediately set out to port it to Ubiquity.

I hadn’t had much experience with handling sentences (and cutting them up and placing them back in different orders), so the Yoda translator turned out to be a bit harder to make. Luckily I had help from friends that reviewed my sometimes silly code and gave corrections.

Download the Ubiquity Yoda speak command here

I also included a handy list of Star Wars quotes to get you going.

Ubiquity = Fun! #

Building Ubiquity commands is fun. I didn’t describe how to build them in this article because the aforementioned tutorial is much better than I ever could. If you are familiar with Javascript, it’s pretty easy as well. Writing a Ubiquity command is the perfect bite-size afternoon project.

Polypane browser for responsive web development and design Hi, I'm Kilian. I make Polypane, the browser for responsive web development and design. If you're reading this site, that's probably interesting to you. Try it out!