Two handy Ubiquity commands

This blog has been very quiet, I guess our contributors are pretty busy with school work. Or at least they were. :) Since I’m pretty busy with mine, here are two ultra short tips.

Ubiquity is an ultra-handy (and geek friendly) tool for Firefox that allows for text commands. Today I created two Ubiquity commands that I find rather handy - especially for redditors :)

Automatic Markdown links

I write this blog in the Markdown markup format, which is the same format that is used for reddit comments (which I have been known to make occasionally). When writing blog posts, I often find that I mention a word or a phrase that is naturally turned into a link. This means I have to open a new tab, Google the word or phrase - open the relevant page and copy the URL into my post or comment, making sure it is in the correct Markdown format for links. Now, Ubiquity is very apt at solving these problems, so I wrote a command that allows me to do one of two things:

  1. I write a phrase, say “Reykjavik University”. I then select that phrase, invoke ubiquity (in my case it is Option+Space) and type “mdlink” and hit enter. This performs a Google search on the phrase, picks the first result and uses its URL to make the phrase a proper Markdown link, replacing the selected text: [Reykjavik University](http://www.ru.is/)

  2. Instead of typing the phrase and selecting it, I can also just invoke Ubuiquity and type “mdlink Reykjavik University” directly in the prompt - with the same result.

The command can be found and installed from Gist.github. Notice the (very cool) feature of Gist that it recognizes Ubiquity commands and inserts the appropriate markup to make FF offer you to install it.

Follow this link to see and/or install the “Markdown link” command

jQuery injection

When browsing, I often find the need to do it programmatically, executing Javascript in the context of a 3rd party webpage. For this it is very handy to have something like jQuery on hand and thus I’ve used a bookmarklet to inject jQuery into any web-page. That makes it very easy to do fancy stuff (like down-voting every comment by a reddit user) through the Firebug JS console.

I converted the bookmarklet linked above into a simple Ubiquity command, allowing for quicker access to the “Inject jQuery” operation. You can get the bookmarklet on its gist.github entry:

Follow this link to see and/or install the “Inject jQuery” command

One Comment

  1. Guðmundur Bjarni:

    I’ve just briefly tried out Ubiquity and I really like the idea. Sadly I haven’t had the time to take a serious look at it and learn how to use it properly.

    About your rant on the lack of updates, there’s a post coming up real soon! :)

Leave a comment

Sorry about the captcha, we were getting buried in spam. At least this one serves a purpose.