Yoda and binary in Firefox with Ubiquity
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 immediatelly promised to make one that weekend, which I didn’t. Instead I made it a weekend later.
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. Realising how awesome it would be to use that in your browser as well, I immediatelly 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 some friends that reviewed my sometimes silly code and gave corrections.
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.
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!
Related articles
Javascript , 19 May 2020Did you know you can create files using JavaScript right inside your browser and have users download them? You can create files with a proper name and mime type and it only takes a few lines of code. Creating downloadable files with JavaScript in your browser only takes a few lines of code. Check out the…
CSS & HTML Design , 4 January 2017If you look above this text, you can see that the header of this blog has a sloped edge. It’s one of my favorite things about this new design. The technique I used has a consistent angle regardless of screen size, can show background images and only needs one HTML element and no pseudo elements.…
CSS & HTML Web , 19 October 2020We’re on the verge of a whole lot of new CSS media queries becoming available. But if you’re a developer that wants to get a head start and try them out, you’re out of luck. Browsers are prototyping them one by one before making them available and we as developers have to wait. Prefers-reduced-data is an…