开发者

Sticky XUL toolbar button

As I can see, 开发者_开发百科addon-bar in FireFox 4 is a toolbar and close icon is a button. And despite the fact that toolbar is customizable (customizable="true") it is impossible to remove that button or even move it to another place.

How is it done?


I think if you overlay the element directly on to the toolbar (rather than the toolbarpalette, which is what you normally do) then you won't be able to move it unless you set the removable="true" attribute on the element.


You can remove the button (I haven't tried moving it around). I used Dom Inspector addon: https://addons.mozilla.org/en-US/firefox/addon/dom-inspector-6622/

Notice that close button is gone on the screenshot.

Sticky XUL toolbar button

I did this manually through Dom Inspector - added that attribute hidden = true. Your button id is addonbar-closebutton so from chrome (chrome overlay) you should be able to do something like: document.getElementById('addonbar-closebutton').hidden = true. This is off the top of my head so maybe it isn't the most accurate but should be simple as that.

If you want to move it I suppose you can try reordering children, or mess with styling, that toolbarspring I think is keeping it on the left and the rest of it on the right.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜