Created
July 27, 2009 14:25
-
-
Save jyt/156383 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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