Link add-on SDK panel to toolbar button

前端 未结 3 1461
小鲜肉
小鲜肉 2021-01-28 09:29

The add-on SDK attaches panels to widgets as seen here. I would like to achieve the same effect using the add-on SDK with a toolbar button instead.

The

3条回答
  •  梦谈多话
    2021-01-28 10:01

    You can create a Toolbarbutton and Panel using the Addon SDK and some Jetpack modules. Try toolbarwidget-jplib and browser-action-jplib by Rob--W.

    You can easy add a button to the toolbar and style the panel whatever you want with css / html:

    var badge = require('browserAction').BrowserAction({
        default_icon: 'images/icon19.png', // optional
        default_title: 'Badge title',      // optional; shown in tooltip
        default_popup: 'popup.html'        // optional
    });
    

提交回复
热议问题