Skip to content

Instantly share code, notes, and snippets.

@wwood
Created January 6, 2010 23:49
Show Gist options
  • Save wwood/270820 to your computer and use it in GitHub Desktop.
Save wwood/270820 to your computer and use it in GitHub Desktop.
/* A mozilla Ubiquity helper to search for UniProt IDs */
CmdUtils.CreateCommand({
names: ["uniprot"],
icon: "http://www.uniprot.org/favicon.ico",
description: "Searches UniProt.",
help: "type 'uniprot something', enter. The something is like searching UniProt for an accession. For the format, add the format to the end of your accession - for instance 'uniprot C4IY21.txt'",
author: { name: "Ben J. Woodcroft", email: "b.woodcroft near pgrad.unimelb.edu.au"},
license: "GPL",
arguments: [{role: 'object', nountype: noun_arb_text}],
execute: function execute(args) {
var urlString = "http://www.uniprot.org/uniprot/"+args.object.text;
Utils.openUrlInBrowser(urlString);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment