Skip to content

Instantly share code, notes, and snippets.

@wbamberg
Created March 12, 2014 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wbamberg/9512931 to your computer and use it in GitHub Desktop.
Save wbamberg/9512931 to your computer and use it in GitHub Desktop.
var { ActionButton } = require('sdk/ui/button/action');
var panels = require("sdk/panel");
var self = require("sdk/self");
var button = ActionButton({
id: "my-button",
label: "my button",
icon: {
"16": "./icon-16.png",
"32": "./icon-32.png",
"64": "./icon-64.png"
},
onClick: handleClick
});
var panel = panels.Panel({
contentURL: self.data.url("panel.html"),
position: {button}
});
function handleClick(state) {
panel.show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment