summaryrefslogtreecommitdiff
path: root/common/content/statusline.js
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-02-19 22:02:01 -0500
committerKris Maglione <maglione.k@gmail.com>2011-02-19 22:02:01 -0500
commitd37e8159ed9aaeff35e7929047ce71007ebb4964 (patch)
treebda2f754ba519edd4fab715b9cf2c9a003506b13 /common/content/statusline.js
parentb648a061c830c0307f3dd27f5baeb15be477bb77 (diff)
downloadpentadactyl-d37e8159ed9aaeff35e7929047ce71007ebb4964.tar.gz
Make Teledactyl minimally functional, albeit with quite a lot of errors on the console.
Diffstat (limited to 'common/content/statusline.js')
-rw-r--r--common/content/statusline.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/common/content/statusline.js b/common/content/statusline.js
index cff302c0..209c88b3 100644
--- a/common/content/statusline.js
+++ b/common/content/statusline.js
@@ -9,7 +9,7 @@
/** @scope modules */
var StatusLine = Module("statusline", {
- init: function () {
+ init: function init() {
this._statusLine = document.getElementById("status-bar");
this.statusBar = document.getElementById("addon-bar") || this._statusLine;
this.statusBar.collapsed = true;
@@ -23,6 +23,8 @@ var StatusLine = Module("statusline", {
#addon-bar > xul|toolbarspring { visibility: collapse; }
]]></css>);
+ util.overlayWindow(window, { append: <><statusbar id="status-bar" ordinal="0"/></> });
+
highlight.loadCSS(util.compileMacro(<![CDATA[
!AddonBar;#addon-bar {
padding-left: 0 !important;
@@ -50,7 +52,7 @@ var StatusLine = Module("statusline", {
let prepend = <e4x xmlns={XUL} xmlns:dactyl={NS}>
<button id="appmenu-button" label="" image="chrome://branding/content/icon16.png" highlight="AppmenuButton" />
<toolbarbutton id="appmenu-toolbar-button" label="" image="chrome://branding/content/icon16.png" />
- <statusbar id="status-bar" highlight="StatusLine" ordinal="0">
+ <statusbar id="status-bar" highlight="StatusLine">
<!-- insertbefore="dactyl.statusBefore;" insertafter="dactyl.statusAfter;" -->
<hbox key="container" hidden="false" align="center" flex="1">
<stack orient="horizontal" align="stretch" flex="1" highlight="CmdLine StatusCmdLine" class="dactyl-container">
@@ -82,7 +84,10 @@ var StatusLine = Module("statusline", {
prepend: prepend.elements()
});
- this.security = content.document.dactylSecurity || "insecure";
+ try {
+ this.security = content.document.dactylSecurity || "insecure";
+ }
+ catch (e) {}
},
get visible() !this.statusBar.collapsed && !this.statusBar.hidden,