Last active
April 20, 2018 17:07
-
-
Save folarb/73613 to your computer and use it in GitHub Desktop.
open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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