Skip to content

Instantly share code, notes, and snippets.

@jyt
Created July 27, 2009 14:26
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 jyt/156384 to your computer and use it in GitHub Desktop.
Save jyt/156384 to your computer and use it in GitHub Desktop.
//This is a ubiquity command
// it will show the hindi meaning of an english word
CmdUtils.CreateCommand({
names: ["hindi of","meaning in hindi"],
description: "This command will show you the the meaning of an english word in hindi",
help: "To use this command type the word in english and it will direct you to page which will show you its hindi meaning",
author: {name: "Jyoti", email: "mail2jyoti88@gmail.com"},
homepage: "http://jyzyy.blogspot.com/",
arguments: [{role: 'object', label: 'english word', nountype: noun_arb_text}],
preview: function preview(pblock, args) {
pblock.innerHTML = "show the meaning of <b>" + args.object.html + "</b> in hindi.";
},
execute: function(args)
{
if(args.object.text=="")
{
displayMessage("please specify a word of english");
return;
}
else
{
Utils.openUrlInBrowser("http://www.shabdkosh.com/en2hi/search.php?e="+args.object.text+"&f=0")
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment