Skip to content

Instantly share code, notes, and snippets.

@Happy-Ferret
Created January 12, 2017 09:50
Show Gist options
  • Save Happy-Ferret/396dafc79b5c3daa4d1dc573d1e20d6e to your computer and use it in GitHub Desktop.
Save Happy-Ferret/396dafc79b5c3daa4d1dc573d1e20d6e to your computer and use it in GitHub Desktop.
Add action button to main menu panel
var button = buttons.ActionButton({
id: "cmd-link",
label: "Open commandline",
icon: {
"16": "./icon.svg",
"32": "./icon.svg",
"64": "./icon.svg"
},
onClick: handleClick
});
Cu.import("resource:///modules/CustomizableUI.jsm");
var { getNodeView } = require("sdk/view/core");
CustomizableUI.addWidgetToArea(getNodeView(button).id, CustomizableUI.AREA_PANEL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment