Skip to content

Instantly share code, notes, and snippets.

@shubhgo
Created October 24, 2009 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shubhgo/217297 to your computer and use it in GitHub Desktop.
Save shubhgo/217297 to your computer and use it in GitHub Desktop.
/* This is a template command. */
CmdUtils.CreateCommand({
names: ["df"],
icon: "http://definr.com/favicon.ico",
description: "Searches for word meanings in the dictionary site Definr.com",
help: "type df <word>",
author: {name: "Shubhgo", email: "shubham.goel@gmail.com"},
license: "GPL",
homepage: "http://techutney.blogspot.com/",
arguments: [{role: 'object', nountype: noun_arb_text}],
preview: function preview(pblock, args) {
pblock.innerHTML = "Look for the meaning of <b>" + args.object.html + "</b>.";
},
execute: function execute(args) {
Utils.openUrlInBrowser("http://www.definr.com/" + args.object.text);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment