diff --git a/common/content/buffer.js b/common/content/buffer.js
index 00115b22..862ec5c3 100644
--- a/common/content/buffer.js
+++ b/common/content/buffer.js
@@ -1535,7 +1535,7 @@ var Buffer = Module("buffer", {
commands.add(["st[op]"],
"Stop loading the current web page",
- function () { buffer.stop() },
+ function () { buffer.stop(); },
{ argCount: "0" });
commands.add(["vie[wsource]"],
diff --git a/common/content/commandline.js b/common/content/commandline.js
index acc0c09a..6c889eeb 100644
--- a/common/content/commandline.js
+++ b/common/content/commandline.js
@@ -265,7 +265,7 @@ var CommandWidgets = Class("CommandWidgets", {
}
});
let res, self = this;
- return Class.replaceProperty(this, name, this[name])
+ return Class.replaceProperty(this, name, this[name]);
},
get completionList() this._whenReady("completionList", "dactyl-completions"),
@@ -300,7 +300,6 @@ var CommandWidgets = Class("CommandWidgets", {
}
});
-
var CommandMode = Class("CommandMode", {
init: function init() {
this.keepCommand = userContext.hidden_option_command_afterimage;
@@ -600,7 +599,7 @@ var CommandLine = Module("commandline", {
},
get lastCommand() this._lastCommand || this.command,
- set lastCommand(val) { this._lastCommand = val },
+ set lastCommand(val) { this._lastCommand = val; },
clear: function clear() {
if (this.widgets.message && this.widgets.message[1] === this._lastClearable)
diff --git a/common/content/commands.js b/common/content/commands.js
index 19bc05b9..246b3209 100644
--- a/common/content/commands.js
+++ b/common/content/commands.js
@@ -324,7 +324,7 @@ var Command = Class("Command", {
if (callable(params))
var makeParams = function makeParams(self, args)
iter.toObject([k, process(v)]
- for ([k, v] in iter(params.apply(self, args))))
+ for ([k, v] in iter(params.apply(self, args))));
else if (params)
makeParams = function makeParams(self, args)
iter.toObject([name, process(args[i])]
@@ -800,7 +800,7 @@ var Commands = Module("commands", {
// Push possible option matches into completions
if (complete && !onlyArgumentsRemaining)
completeOpts = options.filter(function (opt) opt.multiple || !set.has(args, opt.names[0]));
- }
+ };
let resetCompletions = function resetCompletions() {
completeOpts = null;
args.completeArg = null;
@@ -808,7 +808,7 @@ var Commands = Module("commands", {
args.completeFilter = null;
args.completeStart = i;
args.quote = Commands.complQuote[""];
- }
+ };
if (complete) {
resetCompletions();
matchOpts("");
@@ -820,7 +820,7 @@ var Commands = Module("commands", {
complete.message = error;
else
dactyl.assert(false, error);
- }
+ };
outer:
while (i < str.length || complete) {
diff --git a/common/content/dactyl.js b/common/content/dactyl.js
index 0677039a..24363969 100644
--- a/common/content/dactyl.js
+++ b/common/content/dactyl.js
@@ -165,7 +165,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
}
catch (e if e.message == "can't wrap XML objects") {
// Horrible kludge.
- callback.get().apply(null, [String(args[0])].concat(args.slice(1)))
+ callback.get().apply(null, [String(args[0])].concat(args.slice(1)));
}
}
catch (e) {
@@ -213,7 +213,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
for (let obj in values(results))
if (obj.helpTag in services["dactyl:"].HELP_TAGS)
yield dactyl.generateHelp(obj, null, null, true);
- }
+ };
},
/**
@@ -227,7 +227,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
let elems = {
bell: document.getElementById("dactyl-bell"),
strut: document.getElementById("dactyl-bell-strut")
- }
+ };
XML.ignoreWhitespace = true;
if (!elems.bell)
util.overlayWindow(window, {
@@ -609,13 +609,13 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
}
}
return result;
- }
+ };
// Find the tags in the document.
let addTags = function addTags(file, doc) {
for (let elem in util.evaluateXPath("//@tag|//dactyl:tags/text()|//dactyl:tag/text()", doc))
for (let tag in values((elem.value || elem.textContent).split(/\s+/)))
tagMap[tag] = file;
- }
+ };
let namespaces = ["locale-local", "locale"];
services["dactyl:"].init({});
@@ -759,7 +759,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
{rec(NEWS, 0)}
.toXMLString()))
- ]
+ ];
}
addTags("versions", util.httpGet("dactyl://help/versions").responseXML);
@@ -925,8 +925,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
k.@name = name;
if (mode)
k.@mode = mode;
- return k
- }
+ return k;
+ };
}
else if (obj instanceof Option) {
link = function (opt, name) {name};
diff --git a/common/content/events.js b/common/content/events.js
index f2d2dd04..e64b339d 100644
--- a/common/content/events.js
+++ b/common/content/events.js
@@ -149,7 +149,7 @@ var ProcessorStack = Class("ProcessorStack", {
this.processors = processors;
- return this.execute(result, options["timeout"] && options["timeoutlen"] === 0)
+ return this.execute(result, options["timeout"] && options["timeoutlen"] === 0);
}
});
@@ -191,7 +191,7 @@ var KeyProcessor = Class("KeyProcessor", {
if (self.preExecute)
self.preExecute.apply(self, args);
let res = map.execute.call(map, update({ self: self.main.params.mappingSelf || self.main.mappingSelf || map },
- args))
+ args));
if (self.postExecute)
self.postExecute.apply(self, args);
return res;
@@ -596,7 +596,7 @@ var Events = Module("events", {
var t = TYPES[type];
var evt = doc.createEvent((t || "HTML") + "Events");
- let defaults = DEFAULTS[t || "HTML"]
+ let defaults = DEFAULTS[t || "HTML"];
evt["init" + t + "Event"].apply(evt, Object.keys(defaults)
.map(function (k) k in opts ? opts[k]
: defaults[k]));
diff --git a/common/content/history.js b/common/content/history.js
index e2447b90..980dccb1 100644
--- a/common/content/history.js
+++ b/common/content/history.js
@@ -231,7 +231,7 @@ var History = Module("history", {
"visitcount"
].map(function (order) [
["+" + order.replace(" ", ""), "Sort by " + order + " ascending"],
- ["-" + order.replace(" ", ""), "Sort by " + order + " descending"],
+ ["-" + order.replace(" ", ""), "Sort by " + order + " descending"]
]));
}
}
diff --git a/common/content/mappings.js b/common/content/mappings.js
index b9f116c8..509cd23f 100644
--- a/common/content/mappings.js
+++ b/common/content/mappings.js
@@ -103,7 +103,7 @@ var Map = Class("Map", {
if (!isObject(args)) // Backwards compatibility :(
args = iter(["motion", "count", "arg", "command"])
.map(function ([i, prop]) [prop, this[i]], arguments)
- .toObject()
+ .toObject();
let self = this;
function repeat() self.action(args)
@@ -284,7 +284,7 @@ var MapHive = Class("MapHive", {
for (let key in events.iterKeys(name)) {
state += key;
if (state !== name)
- states.candidates[state] = (states.candidates[state] || 0) + 1
+ states.candidates[state] = (states.candidates[state] || 0) + 1;
}
}
return states;
@@ -330,7 +330,6 @@ var Mappings = Module("mappings", {
remove: deprecated("mappings.user.remove", function remove(mode, cmd) this.user.remove(mode, cmd)),
removeAll: deprecated("mappings.user.clear", function removeAll(mode) this.user.clear(mode)),
-
/**
* Adds a new default key mapping.
*
@@ -534,7 +533,7 @@ var Mappings = Module("mappings", {
names: ["-modes", "-mode", "-m"],
type: CommandOption.LIST,
description: "Create this mapping in the given modes",
- default: mapmodes || ["n", "v"],
+ default: mapmodes || ["n", "v"]
}),
{
names: ["-nopersist", "-n"],
@@ -693,7 +692,7 @@ var Mappings = Module("mappings", {
Option.splitList(context.filter);
context.advance(Option._splitAt);
- context.compare = CompletionContext.Sort.unsorted
+ context.compare = CompletionContext.Sort.unsorted;
context.completions = [
[buffer.uri.host, "Current Host"],
[buffer.uri.spec, "Current Page"]
@@ -788,7 +787,7 @@ var Mappings = Module("mappings", {
name: name,
columns: [
mode == mainMode ? "" : {mode.name},
- hive.name == "builtin" ? "" : {hive.name},
+ hive.name == "builtin" ? "" : {hive.name}
],
__proto__: map
};
diff --git a/common/content/modes.js b/common/content/modes.js
index 012cb280..0f5ba7a7 100644
--- a/common/content/modes.js
+++ b/common/content/modes.js
@@ -140,8 +140,8 @@ var Modes = Module("modes", {
: "PASS THROUGH (next)"
}, {
// Fix me.
- preExecute: function (map) { if (modes.main == modes.QUOTE && map.name !== "") modes.pop() },
- postExecute: function (map) { if (modes.main == modes.QUOTE && map.name === "") modes.pop() },
+ preExecute: function (map) { if (modes.main == modes.QUOTE && map.name !== "") modes.pop(); },
+ postExecute: function (map) { if (modes.main == modes.QUOTE && map.name === "") modes.pop(); },
onKeyPress: function () { if (modes.main == modes.QUOTE) modes.pop() }
});
this.addMode("IGNORE", { hidden: true }, {
@@ -484,7 +484,7 @@ var Modes = Module("modes", {
mappings.add([modes.MENU], [""],
"Close the current popup",
- function () { events.feedkeys("") });
+ function () { events.feedkeys(""); });
},
prefs: function () {
prefs.watch("accessibility.browsewithcaret", modes.closure.onCaretChange);
diff --git a/common/content/mow.js b/common/content/mow.js
index 69727727..1cea5fb5 100644
--- a/common/content/mow.js
+++ b/common/content/mow.js
@@ -144,7 +144,7 @@ var MOW = Module("mow", {
const openLink = function openLink(where) {
event.preventDefault();
dactyl.open(event.target.href, where);
- }
+ };
if (event.target instanceof HTMLAnchorElement)
switch (events.toString(event)) {
@@ -297,7 +297,7 @@ var MOW = Module("mow", {
else if (res === PASS)
events.feedkeys(command);
});
- }
+ };
bind(["j", "", ""], "Scroll down one line",
function () { mow.scrollVertical("lines", 1); },
@@ -333,10 +333,10 @@ var MOW = Module("mow", {
function () mow.isScrollable(-1), BEEP);
bind(["gg"], "Scroll to the beginning of output",
- function () { mow.scrollToPercent(null, 0); })
+ function () { mow.scrollToPercent(null, 0); });
bind(["G"], "Scroll to the end of output",
- function () { mow.body.scrollTop = mow.body.scrollHeight; })
+ function () { mow.body.scrollTop = mow.body.scrollHeight; });
// copy text to clipboard
bind([""], "Yank selection to clipboard",
diff --git a/common/content/options.js b/common/content/options.js
index 1354d4ae..f92d3106 100644
--- a/common/content/options.js
+++ b/common/content/options.js
@@ -849,7 +849,7 @@ var Options = Module("options", {
{template.linkifyHelp(map.description)}
>)
}
- }
+ };
dactyl.addUsageCommand({
name: ["listo[ptions]", "lo"],
diff --git a/common/modules/addons.jsm b/common/modules/addons.jsm
index a22d3147..3d5fe593 100644
--- a/common/modules/addons.jsm
+++ b/common/modules/addons.jsm
@@ -135,7 +135,6 @@ var actions = {
}
};
-
var Addon = Class("Addon", {
init: function init(addon, list) {
this.addon = addon;
@@ -249,7 +248,6 @@ var Addon = Class("Addon", {
});
});
-
var AddonList = Class("AddonList", {
init: function init(modules, types, filter) {
this.modules = modules;
diff --git a/common/modules/javascript.jsm b/common/modules/javascript.jsm
index 9d83a52f..9f1d64ed 100644
--- a/common/modules/javascript.jsm
+++ b/common/modules/javascript.jsm
@@ -9,7 +9,7 @@ try {
Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("javascript", {
exports: ["JavaScript", "javascript"],
- use: ["services", "template", "util"],
+ use: ["services", "template", "util"]
}, this);
// TODO: Clean this up.
@@ -18,7 +18,7 @@ var JavaScript = Module("javascript", {
Local: function (dactyl, modules, window) ({
init: function () {
this.modules = modules;
- this.window = window
+ this.window = window;
this._stack = [];
this._functions = [];
diff --git a/common/modules/prefs.jsm b/common/modules/prefs.jsm
index 21531536..c287dab8 100644
--- a/common/modules/prefs.jsm
+++ b/common/modules/prefs.jsm
@@ -267,7 +267,7 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
*/
restore: function (branch) {
this.getNames(this.RESTORE + (branch || "")).forEach(function (pref) {
- this.safeSet(pref.substr(this.RESTORE.length), this.get(pref), null, true)
+ this.safeSet(pref.substr(this.RESTORE.length), this.get(pref), null, true);
this.reset(pref);
}, this);
},
diff --git a/common/modules/sanitizer.jsm b/common/modules/sanitizer.jsm
index 47f402e8..7295c07a 100644
--- a/common/modules/sanitizer.jsm
+++ b/common/modules/sanitizer.jsm
@@ -605,7 +605,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
["1h", "Past hour"],
["1d", "Past day"],
["1w", "Past week"]
- ]
+ ];
},
validator: function (value) /^(a(ll)?|s(ession)|\d+[mhdw])$/.test(value)
});
diff --git a/common/modules/template.jsm b/common/modules/template.jsm
index e7ddcab7..8cec311f 100644
--- a/common/modules/template.jsm
+++ b/common/modules/template.jsm
@@ -199,7 +199,7 @@ var Template = Module("Template", {
XML.ignoreWhitespace = false; XML.prettyPrinting = false;
type = type || (/^'.*'$/.test(topic) ? "HelpOpt" :
/^:\w/.test(topic) ? "HelpEx" : "HelpKey");
- return {text || topic}
+ return {text || topic};
},
HelpLink: function (topic) {
if (!services["dactyl:"].initialized)
@@ -212,7 +212,7 @@ var Template = Module("Template", {
let tag = (/^'.*'$/.test(topic) ? "o" :
/^:\w/.test(topic) ? "ex" : "k");
topic = topic.replace(/^'(.*)'$/, "$1");
- return <{tag} xmlns={NS}>{topic}{tag}>
+ return <{tag} xmlns={NS}>{topic}{tag}>;
},
// if "processStrings" is true, any passed strings will be surrounded by " and
@@ -382,7 +382,7 @@ var Template = Module("Template", {
href={url} path={path} line={frame.lineNumber}
highlight="URL">{
path + ":" + frame.lineNumber
- }
+ };
},
table: function table(title, data, indent) {
diff --git a/common/tests/functional/dactyl.js b/common/tests/functional/dactyl.js
index 55b85dde..f6f9fed2 100644
--- a/common/tests/functional/dactyl.js
+++ b/common/tests/functional/dactyl.js
@@ -435,21 +435,21 @@ Controller.prototype = {
/**
* Opens the output message window by echoing a single newline character.
*/
- openMessageWindow: wrapAssertNoErrors(function() {
+ openMessageWindow: wrapAssertNoErrors(function () {
this.dactyl.dactyl.echo("\n");
}, "Opening message window"),
/**
* Clears the current message.
*/
- clearMessage: function() {
+ clearMessage: function () {
this.elements.message.value = ""; // XXX
},
/**
* Closes the output message window if open.
*/
- closeMessageWindow: wrapAssertNoErrors(function() {
+ closeMessageWindow: wrapAssertNoErrors(function () {
for (let i = 0; i < 15 && !this.elements.multilineContainer.collapsed; i++)
this.controller.keypress(null, "VK_ESCAPE", {});
this.assertMessageWindowOpen(false, "Clearing message window failed");
diff --git a/common/tests/functional/utils.js b/common/tests/functional/utils.js
index 309fea11..b5fa59f0 100644
--- a/common/tests/functional/utils.js
+++ b/common/tests/functional/utils.js
@@ -32,14 +32,14 @@ for (var [k, v] in Iterator({
assert: function (funcName, value, comment)
test(value, {
- function: funcName,
+ function: funcName,
value: toJSON(value),
comment: toJSON(comment)
}),
assertEqual: function (funcName, want, got, comment)
test(want == got, {
- function: funcName,
+ function: funcName,
want: toJSON(want), got: toJSON(got),
comment: toJSON(comment)
})