Skip to content

@kwijibo /x
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
prefix.cc lookup ubiquity command
CmdUtils.CreateCommand({
name: "prefix",
takes: {"term": noun_arb_text},
homepage: "http://kwijibo.talis.com/",
author: { name: "Keith Alexander", email: "keith.alexander@talis.com"},
license: "MPL",
description: "performs a lookup on prefix.cc (http://prefix.cc/)",
preview: function(previewBlock, term) {
previewBlock.innerHTML = "looking up " + term.text ;
var baseURI = "http://prefix.cc/" + term.text;
jQuery.ajax({
type: "GET",
url: baseURI,
datatype: "string",
error: function(responseData) {
previewBlock.innerHTML = "<em>Error:" + responseData + "</em>";
},
success: function(responseData) {
previewBlock.innerHTML = responseData; }
});
},
execute: function(term) {
Utils.openUrlInBrowser("http://prefix.cc/" + term.text);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.