mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-06 05:55:46 +01:00
Fix the statusbar in Minefield.
This commit is contained in:
@@ -10,13 +10,23 @@
|
|||||||
|
|
||||||
const StatusLine = Module("statusline", {
|
const StatusLine = Module("statusline", {
|
||||||
init: function () {
|
init: function () {
|
||||||
this._statusBar = document.getElementById("status-bar");
|
this._statusBar = document.getElementById("addon-bar") || document.getElementById("status-bar");
|
||||||
this._statusBar.collapsed = true; // it is later restored unless the user sets laststatus=0
|
this._statusBar.collapsed = true; // it is later restored unless the user sets laststatus=0
|
||||||
|
|
||||||
// our status bar fields
|
// our status bar fields
|
||||||
this.widgets = array(["status", "url", "inputbuffer", "progress", "tabcount", "bufferposition", "zoomlevel"]
|
this.widgets = array(["status", "url", "inputbuffer", "progress", "tabcount", "bufferposition", "zoomlevel"]
|
||||||
.map(function (field) [field, document.getElementById("dactyl-statusline-field-" + field)]))
|
.map(function (field) [field, document.getElementById("dactyl-statusline-field-" + field)]))
|
||||||
.toObject();
|
.toObject();
|
||||||
|
|
||||||
|
if (this._statusBar.localName == "toolbar") {
|
||||||
|
styles.addSheet(true, "addon-bar", config.styleableChrome, <css><![CDATA[
|
||||||
|
#addon-bar { padding: 0 !important; }
|
||||||
|
#addon-bar > statusbar { -moz-box-flex: 1 }
|
||||||
|
]]></css>);
|
||||||
|
let parent = this.widgets.status.parentNode;
|
||||||
|
parent.removeChild(this.widgets.status);
|
||||||
|
parent.insertBefore(this.widgets.status, parent.firstChild);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user