Skip to content

Instantly share code, notes, and snippets.

@jyt jyt/blogsearch
Created Jul 27, 2009

Embed
What would you like to do?
CmdUtils.CreateCommand({
names: [ 'blogsearch', 'search blog'],
author: {name:"jyoti", email: "mail2jyoti88@gmail.com"},
description:"It will show the blogs according to the keyword specified by you.",
arguments: [ {role: 'object', nountype: noun_arb_text, label: 'keyword'}],
_func: function(term)
{
return "http://blogsearch.google.com/blogsearch?hl=en&ie=UTF-8&q="+term+"&btnG=Search+Blogs";
},
preview: function(pblock,args)
{
var msg="It will show the blogs related to the keyword "+ args.object.text;
pblock.innerHTML=msg;
},
execute: function(args)
{
if (args.text=="")
{
displayMessage("Enter some keyword atleast");
}
else
Utils.openUrlInBrowser(this._func(args.object.text));
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.