Tag Archive for 'Javascript'

Ubiquity Search Script

I wanted to practice my Javascript and I liked the idea of Ubiquity, so I decided to write some search commands for it. Ubiquity already has a utility function to create them, makeSearchCommand, but it’s too limiting. For example, if I do not provide a search query argument, it still takes me to the results page, when in fact it should take me to the home page of the site I’m searching, like Open Search Plugins do. A kind person in #ubiquity in the Mozilla IRC servers filed a ticket saying that makeSearchCommand should allow this behavior. In the mean time, I created some utility functions which would make it simple to create a search command that would do this, but for this I had to use CmdUtils.CreateCommand. But since I wanted to create many of these search commands, I came up with a way to make the creation of these commands a simple function call. Continue reading ‘Ubiquity Search Script’