diff --git a/common/content/dactyl.js b/common/content/dactyl.js
index 4a29001f..26ec0c30 100644
--- a/common/content/dactyl.js
+++ b/common/content/dactyl.js
@@ -192,21 +192,30 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
*/
beep: function () {
if (options["visualbell"]) {
- let bell = document.getElementById("dactyl-bell");
- let strut = document.getElementById("dactyl-bell-strut");
- if (!bell) {
- bell = document.documentElement.insertBefore(
- util.xmlToDom(, document),
- document.documentElement.firstChild);
- strut = document.documentElement.appendChild(
- util.xmlToDom(, document));
+ let elems = {
+ bell: document.getElementById("dactyl-bell"),
+ strut: document.getElementById("dactyl-bell-strut")
}
+ if (!elems.bell)
+ util.overlayWindow(window, {
+ objects: elems,
+ prepend: <>
+
+
+
+ >,
+ append: <>
+
+
+
+ >
+ }, elems);
- bell.style.height = window.innerHeight + "px";
- strut.style.marginBottom = -window.innerHeight + "px";
- strut.style.display = bell.style.display = "";
+ elems.bell.style.height = window.innerHeight + "px";
+ elems.strut.style.marginBottom = -window.innerHeight + "px";
+ elems.strut.style.display = elems.bell.style.display = "";
- util.timeout(function () { strut.style.display = bell.style.display = "none"; }, 20);
+ util.timeout(function () { elems.strut.style.display = elems.bell.style.display = "none"; }, 20);
}
else {
let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound);
diff --git a/common/content/options.js b/common/content/options.js
index 33001b3e..69aca5e9 100644
--- a/common/content/options.js
+++ b/common/content/options.js
@@ -82,7 +82,7 @@ var Option = Class("Option", {
get isDefault() this.stringValue === this.stringDefaultValue,
/** @property {value} The option's global value. @see #scope */
- get globalValue() options.store.get(this.name, {}).value,
+ get globalValue() { try { return options.store.get(this.name, {}).value } catch (e) { util.reportError(e); throw e; } },
set globalValue(val) { options.store.set(this.name, { value: val, time: Date.now() }); },
/**
diff --git a/common/content/statusline.js b/common/content/statusline.js
index 6d3cb454..baeb4f49 100644
--- a/common/content/statusline.js
+++ b/common/content/statusline.js
@@ -26,7 +26,7 @@ var StatusLine = Module("statusline", {
let _commandline = "if (window.dactyl) return dactyl.modules.commandline";
let prepend =
-
+
diff --git a/common/modules/util.jsm b/common/modules/util.jsm
index cb8c65b6..156158ee 100644
--- a/common/modules/util.jsm
+++ b/common/modules/util.jsm
@@ -996,7 +996,10 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
doc.dactylOverlayElements.push(n);
fn(elem, node);
for each (let attr in attr || []) // FIXME: Cleanup...
- elem.setAttributeNS(attr.namespace(), attr.localName(), attr);
+ if (attr.name() != "highlight")
+ elem.setAttributeNS(attr.namespace(), attr.localName(), String(attr));
+ else
+ highlight.highlightNode(elem, String(attr));
}
}
}
@@ -1461,11 +1464,8 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
for each (let attr in node.@*::*)
if (attr.name() != "highlight")
domnode.setAttributeNS(attr.namespace(), attr.localName(), String(attr));
- else {
- domnode.setAttributeNS(NS.uri, "highlight", String(attr));
- for each (let h in String.split(attr, " "))
- highlight.loaded[h] = true;
- }
+ else
+ highlight.highlightNode(domnode, String(attr));
for each (let child in node.*::*)
domnode.appendChild(xmlToDom(child, doc, nodes));