简体   繁体   中英

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?

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.

在此处输入图片说明

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.

我认为,如果直接将元素叠加在工具栏上(而不是通常的工具栏调色板),那么除非您在元素上设置了removeable =“ true”属性,否则您将无法移动它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM