Skip to content

Instantly share code, notes, and snippets.

@cbfrance
Created September 21, 2009 21:40
Show Gist options
  • Save cbfrance/190568 to your computer and use it in GitHub Desktop.
Save cbfrance/190568 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
names: ["worldwidelexicon"],
icon: "http://www.worldwidelexicon/favicon.ico",
description: "Translates page fragments using the WWL translation memory.",
help: "Select text and type 'translate with wwl'",
author: {name: "Chris Blow", email: "[email protected]"},
license: "GPL",
homepage: "http://worldwidelexicon.com/ubiquity",
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