Skip to content

Instantly share code, notes, and snippets.

@imnotpete
Forked from anonymous/x
Created August 7, 2009 19:58
Show Gist options
  • Save imnotpete/164129 to your computer and use it in GitHub Desktop.
Save imnotpete/164129 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
names: ["goto"],
icon: "http://www.mozilla-europe.org/favicon.ico",
homepage: "http://www.google.com/",
author: { name: "Jan S", email: "neonsamurai@hotmail.com"},
license: "GPL",
description: "url to navigate to",
help: "Type any url to open in a new tab...",
arguments: [ {role: "object", nountype: noun_arb_text, label: "url"}],
preview: function( pblock, args) {
var template = "Go to ${url}";
pblock.innerHTML = CmdUtils.renderTemplate(template, {"url": "any url..."});
},
execute: function(args) {
Utils.openUrlInBrowser(args.object.text);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment