Skip to content

Instantly share code, notes, and snippets.

@folarb
Last active April 20, 2018 17:07
Show Gist options
  • Save folarb/73613 to your computer and use it in GitHub Desktop.
Save folarb/73613 to your computer and use it in GitHub Desktop.
open
CmdUtils.CreateCommand({
name: "open",
icon: "http://example.com/example.png",
author: { name: "Robert B****", email: "robert.b****@gmail.com"},
license: "GPL",
description: "Opens sites",
help: "Enter 'open' and the site url you want to open.",
takes: {"site": noun_arb_text},
preview: function( pblock, site ) {
var template = "Opens ${site}";
pblock.innerHTML = CmdUtils.renderTemplate(template, {"site": site.text});
},
execute: function(site) {
Utils.openUrlInBrowser(site.text);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment