Skip to content

Instantly share code, notes, and snippets.

@phmongeau
Created February 25, 2009 22:44
Show Gist options
  • Save phmongeau/70487 to your computer and use it in GitHub Desktop.
Save phmongeau/70487 to your computer and use it in GitHub Desktop.
/* This is a template command */
CmdUtils.CreateCommand({
name: "timer",
icon: "http://www.lemieuxster.com/favicon.ico",
homepage: "e.ggtimer.com",
author: { name: "Philippe Mongeau", email: "ph.mongeau@gmail.com"},
license: "GPL",
description: "set a timer using e.ggtimer.com",
help: "type the name of the command followed by the time you want to set",
takes: {"time": noun_arb_text},
preview: function( pblock, time ) {
pblock.innerHTML = "set timer to " + time.text
},
execute: function( time ) {
displayMessage("the timer will ring in " + time.text);
Utils.openUrlInBrowser("http://e.ggtimer.com/" + time.text);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment