Skip to content

Instantly share code, notes, and snippets.

@cers
Created September 21, 2009 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cers/190213 to your computer and use it in GitHub Desktop.
Save cers/190213 to your computer and use it in GitHub Desktop.
/* This is a template command. */
CmdUtils.CreateCommand({
names: ["example"],
icon: "http://www.mozilla.com/favicon.ico",
description: "A short description of your command.",
help: "How to use your command.",
author: {name: "Your Name", email: "you@mozilla.com"},
license: "GPL",
homepage: "http://labs.mozilla.com/",
arguments: [{role: 'object', nountype: noun_arb_text}],
preview: function preview(pblock, args) {
pblock.innerHTML = "Your input is <b>" + args.object.html + "</b>.";
},
execute: function execute(args) {
displayMessage("You selected: " + args.object.text, this);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment