summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcommon/bootstrap.js11
-rw-r--r--common/content/autocommands.js2
-rw-r--r--common/content/dactyl.js3
-rw-r--r--common/content/statusline.js2
4 files changed, 4 insertions, 14 deletions
diff --git a/common/bootstrap.js b/common/bootstrap.js
index 9edd298c..027552f8 100755
--- a/common/bootstrap.js
+++ b/common/bootstrap.js
@@ -31,17 +31,6 @@ function httpGet(url) {
return xmlhttp;
}
-function writeFile(file, buf) {
- let fstream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream);
- let stream = Cc["@mozilla.org/intl/converter-output-stream;1"].createInstance(Ci.nsIConverterOutputStream);
-
- fstream.init(file, 0x02 | 0x08 | 0x20, parseInt("0644", 8), 0);
- stream.init(fstream, "UTF-8", 0, "?");
- stream.writeString(buf);
- stream.close();
- fstream.close();
-}
-
let initialized = false;
let addon = null;
let basePath = null;
diff --git a/common/content/autocommands.js b/common/content/autocommands.js
index 532bccd4..84e9f8c2 100644
--- a/common/content/autocommands.js
+++ b/common/content/autocommands.js
@@ -31,7 +31,7 @@ var AutoCommands = Module("autocommands", {
*/
add: function (events, regexp, cmd) {
events.forEach(function (event) {
- this._store.push(AutoCommand(event, Option.parse.regexplist(regexp), cmd));
+ this._store.push(AutoCommand(event, Option.parse.regexplist(regexp.source || regexp), cmd));
}, this);
},
diff --git a/common/content/dactyl.js b/common/content/dactyl.js
index 75e43856..cf9e9eb9 100644
--- a/common/content/dactyl.js
+++ b/common/content/dactyl.js
@@ -1181,8 +1181,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
*/
reportError: function reportError(error, echo) {
if (error instanceof FailedAssertion || error.message === "Interrupted") {
+ let prefix = io.sourcing ? io.sourcing.file + ":" + io.sourcing.line + ": " : "";
if (error.message)
- dactyl.echoerr(template.linkifyHelp(error.message));
+ dactyl.echoerr(template.linkifyHelp(prefix + error.message));
else
dactyl.beep();
return;
diff --git a/common/content/statusline.js b/common/content/statusline.js
index 0d623666..f78a3691 100644
--- a/common/content/statusline.js
+++ b/common/content/statusline.js
@@ -309,7 +309,7 @@ var StatusLine = Module("statusline", {
if (percent == 100)
this.widgets.zoomlevel.value = "";
else {
- percent = (" " + percent).substr(-3);
+ percent = (" " + Math.round(percent)).substr(-3);
if (full)
this.widgets.zoomlevel.value = " [" + percent + "%]";
else