Skip to content

Instantly share code, notes, and snippets.

@isidorosp
isidorosp / thesaurus.js
Created October 4, 2008 22:57
thesaurus.js - a ubiquity command for finding synonyms
function findSynonyms(word, callback) {
var url = "http://services.aonaware.com/DictService/DictService.asmx/DefineInDict";
var params = Utils.paramsToString({
dictId: "moby-thes", //moby-thes: Moby Thesaurus II
word: word
});
Utils.ajaxGet(url + params, function(xml) {
CmdUtils.loadJQuery( function(jQuery) {
var text = jQuery(xml).find("WordDefinition").text();
@isidorosp
isidorosp / dictionary.js
Created October 5, 2008 20:02
dictionary.js - a revised version of the "define" command
function dictionaryWord(word, callback) {
var url = "http://services.aonaware.com/DictService/DictService.asmx/DefineInDict";
var params = Utils.paramsToString({
dictId: "wn", //wn: WordNet, gcide: Collaborative Dictionary
word: word
});
Utils.ajaxGet(url + params, function(xml) {
CmdUtils.loadJQuery( function(jQuery) {
var text = jQuery(xml).find("WordDefinition").text();

0x08513fa0849e28b752c09211864866f4de2b4e613b4d517c4c210364ecc51957