Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CmdUtils.CreateCommand({
names: ['show time in','time'],
author: {name:"jyoti", email: "mail2jyoti88@gmail.com"},
description:"It will show the current time in the place you specified.",
arguments: [ {role: 'object', nountype: noun_arb_text, label: 'name of a place'}],
_time: function(term)
{
return "http://www.timeanddate.com/worldclock/results.html?query="+term;
},
preview: function(pblock,args)
{
var msg="It will show the current time in "+ args.object.text;
pblock.innerHTML=msg;
},
execute: function(args)
{
if (args.text=="")
{
displayMessage("enter name of the place whose current time u want to know");
}
else
Utils.openUrlInBrowser(this._time(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.