Skip to content

Instantly share code, notes, and snippets.

@marcovannoord
Created June 1, 2009 10:50
Show Gist options
  • Save marcovannoord/121351 to your computer and use it in GitHub Desktop.
Save marcovannoord/121351 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: {"input": /.*/},
preview: function(pblock, input) {
pblock.innerHTML = "Your input is <b>" + input.text + "</b>.";
},
execute: function(input) {
displayMessage("You selected: " + input.text);
goto("http://binsearch.info")
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment