Skip to content

Instantly share code, notes, and snippets.

@jyt
Created July 27, 2009 14:27
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/156386 to your computer and use it in GitHub Desktop.
Save jyt/156386 to your computer and use it in GitHub Desktop.
//This is a ubiquity command
//to view lyrics of a hindi song specified by you.
CmdUtils.CreateCommand({
names: ["lyrics of","show lyrics of"],
icon: "chrome://ubiquity/skin/icons/tuner-top.png",
description: "This command will show you the lyrics of a hindi song whose initial words will be specified by you",
help: "To use this command type the initials of a hindi song whose lyrics you want to see",
author: {name: "Jyoti", email: "mail2jyoti88@gmail.com"},
homepage: "http://jyzyy.blogspot.com/",
arguments: [{role: 'object', label: 'song', nountype: noun_arb_text}],
preview: function preview(pblock, args) {
pblock.innerHTML = "show the lyrics of <b>" + args.object.html + "</b> .";
},
execute: function(args)
{
if(args.object.text=="")
{
displayMessage("specify some initials");
return;
}
else
{
Utils.openUrlInBrowser("http://www.giitaayan.com/search.asp?browse=stitle&s="+args.object.text+"&submit=search")
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment