Skip to content

Instantly share code, notes, and snippets.

@bbbco
Created October 23, 2008 19:04
Show Gist options
  • Save bbbco/19156 to your computer and use it in GitHub Desktop.
Save bbbco/19156 to your computer and use it in GitHub Desktop.
Ubiquity Thesaurus Command
CmdUtils.CreateCommand( {
name: "thesaurus",
takes: {search: noun_arb_text},
locale: "en-US",
author: {
name: "Brian Goad",
email: "[email protected]"},
license: "MPL",
icon: "http://www.merriam-webster.com/favicon.ico",
description: "Searches Webster's Thesaurus for your word.",
execute: function(dObject) {
var Url = "http://www.merriam-webster.com/thesaurus/" + dObject.text; Utils.openUrlInBrowser(Url);
},
preview: function(pblock, Text) {
var msg = "Searches Webster's Thesaurus for ";
if (Text.text) {
msg += searchText.text;
} else {
msg += "your words.";
}
pblock.innerHTML = msg;
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment