Created
June 12, 2009 19:27
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({ | |
name: "show time in", | |
author: {name:"jyoti", email: "mail2jyoti88@gmail.com"}, | |
description:"It will show the current time in the place you specified.", | |
takes: {"name of a place" : noun_arb_text}, | |
_time: function(term) | |
{ | |
return "http://www.timeanddate.com/worldclock/results.html?query="+term; | |
}, | |
preview: function(pblock,pname) | |
{ | |
var msg="It will show the current time in "+ pname.text; | |
pblock.innerHTML=msg; | |
}, | |
execute: function(pname) | |
{ | |
if (pname.text=="") | |
{ | |
displayMessage("enter name of the place whose current time u want to know"); | |
} | |
else | |
Utils.openUrlInBrowser(this._time(pname.text)); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment