Skip to content

Instantly share code, notes, and snippets.

@mutsuda
Created May 9, 2009 12:32
Show Gist options
  • Save mutsuda/109244 to your computer and use it in GitHub Desktop.
Save mutsuda/109244 to your computer and use it in GitHub Desktop.
/* This is a template command. */
CmdUtils.CreateCommand({
name: "example",
icon: "http://example.com/example.png",
homepage: "http://example.com/",
author: {name: "Your Name", email: "you@example.com"},
license: "GPL",
description: "A short description of your command",
help: "How to use your command",
takes: {"codi_parada": /.*/, "bus": /.*/},
preview: function(pblock, codi_parada, bus) {
pblock.innerHTML = "Your input is <b>" + codi_parada.text + " " + bus+ "</b>.";
},
execute: function(codi_parada, bus) {
displayMessage("You selected: " + codi_parada.text + " " + bus.text);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment