Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

/x

Created March 1, 2009 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/72189 to your computer and use it in GitHub Desktop.
Save anonymous/72189 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
name: "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...",
takes: {"url": noun_arb_text},
preview: function( pblock, input ) {
var template = "Go to ${url}";
pblock.innerHTML = CmdUtils.renderTemplate(template, {"url": "any url..."});
},
execute: function(input) {
Utils.openUrlInBrowser(input.html);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment