User:Steakdepapillon
Work
https://bugzilla.mozilla.org/show_bug.cgi?id=492546
https://bugzilla.mozilla.org/show_bug.cgi?id=492831
https://bugzilla.mozilla.org/show_bug.cgi?id=470441
https://bugzilla.mozilla.org/show_bug.cgi?id=468294
https://bugzilla.mozilla.org/show_bug.cgi?id=493589
Adding button in Fennec
https://developer.mozilla.org/En/XUL_Tutorial/Overlays
Toolbar
<toolbar id="toolbar-main">
<toolbarbutton id="my-toolbar-button"
type="button"
class="urlbar-button button-dark"
label="My button"
insertafter="tool-bookmarks"
oncommand=""
/>
</toolbar>
Control Bar
<vbox id="browser-controls">
<toolbarbutton id="my-browser-control-button"
type="button"
class="panel-button button-dark"
label="My button"
insertafter="tool-star"
oncommand=""
/>
</vbox>
Panel Control
<vbox id="panel-controls">
<toolbarbutton id="my-panel-control-button"
type="radio"
class="panel-button button-dark"
group="1"
label="My button"
linkedpanel="mylinkepanel"
insertbefore="tool-addons"
/>
</vbox>
Adding a new control panel
In your overlay add theses lines :
<hbox id="panel-items">
<vbox id="mylinkedpanel" flex="1">
<label value="my label" />
</vbox>
</hbox>
To call this panel from somewhere in the UI, simply make a call to BrowserUI.showPanel('mylinkedpanel') somewhere in your code, it you want to synchronise it with a Panel Control button you can use a custom function that do that for you :
function synchronizePanelWithButton(){
var radioElement = document.getElementById('my-panel-control-button');
radioElement.checked = true;
BrowserUI.showPanel('mylinkedpanel');
}
Opening a new tab
Browser.addTab( myurl, bringToFront )
On_page_load#Attaching_a_script
see https://developer.mozilla.org/en/Code_snippets/On_page_load#Attaching_a_script
For alpha version : replace the id 'appcontent' by 'content'
Since beta : replace the id 'appcontent' by 'browsers'