From 5ab1befbf7f3daad1967dcc86421ba271b8456a2 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 25 May 2015 23:54:56 +1000 Subject: [PATCH] Add missing semicolons. --- common/content/autocommands.js | 2 +- common/content/bookmarks.js | 2 +- common/content/browser.js | 2 +- common/content/commandline.js | 6 ++--- common/content/dactyl.js | 2 +- common/content/editor.js | 2 +- common/content/hints.js | 2 +- common/content/marks.js | 2 +- common/content/modes.js | 2 +- common/content/quickmarks.js | 2 +- common/modules/addons.jsm | 6 ++--- common/modules/base.jsm | 41 +++++++++++++++--------------- common/modules/bookmarkcache.jsm | 2 +- common/modules/bootstrap.jsm | 2 +- common/modules/buffer.jsm | 6 ++--- common/modules/commands.jsm | 4 +-- common/modules/completion.jsm | 2 +- common/modules/contexts.jsm | 3 +-- common/modules/dom.jsm | 10 ++++---- common/modules/downloads.jsm | 4 +-- common/modules/highlight.jsm | 2 +- common/modules/io.jsm | 4 +-- common/modules/javascript.jsm | 3 +-- common/modules/main.jsm | 2 +- common/modules/options.jsm | 6 ++--- common/modules/overlay.jsm | 2 +- common/modules/prefs.jsm | 6 ++--- common/modules/promises.jsm | 6 ++--- common/modules/sanitizer.jsm | 4 +-- common/modules/storage.jsm | 8 +++--- common/modules/styles.jsm | 8 +++--- common/modules/template.jsm | 2 +- common/modules/util.jsm | 2 +- common/tests/functional/dactyl.jsm | 4 +-- pentadactyl/content/config.js | 3 +-- 35 files changed, 82 insertions(+), 84 deletions(-) diff --git a/common/content/autocommands.js b/common/content/autocommands.js index 0f1a4fcf..76123504 100644 --- a/common/content/autocommands.js +++ b/common/content/autocommands.js @@ -63,7 +63,7 @@ var AutoCmdHive = Class("AutoCmdHive", Contexts.Hive, { remove: function (event, filter) { filter = filter && String(Group.compileFilter(filter)); this._store = this._store.filter(cmd => !cmd.match(event, filter)); - }, + } }); /** diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js index 87ac0d89..195b16a3 100644 --- a/common/content/bookmarks.js +++ b/common/content/bookmarks.js @@ -646,7 +646,7 @@ var Bookmarks = Module("bookmarks", { options.add(["suggestengines"], "Search engines used for search suggestions", "stringlist", "google", - { completer: function completer(context) completion.searchEngine(context, true), }); + { completer: function completer(context) completion.searchEngine(context, true) }); }, completion: function initCompletion() { diff --git a/common/content/browser.js b/common/content/browser.js index 094dc187..2c4c2d22 100644 --- a/common/content/browser.js +++ b/common/content/browser.js @@ -198,7 +198,7 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), onLocationChange: util.wrapCallback(function onLocationChange(browser) { Buffer(browser.contentWindow).locationChanged(); - }), + }) } }, { }, { diff --git a/common/content/commandline.js b/common/content/commandline.js index 866ec921..1b66af3f 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -47,7 +47,7 @@ var CommandWidgets = Class("CommandWidgets", { ["hbox", { id: s + "commandline", hidden: "false", class: "dactyl-container", highlight: "Normal StatusNormal", collapsed: "true" }, ["label", { id: s + "commandline-prompt", class: "dactyl-commandline-prompt plain", flex: "0", crop: "end", value: "", collapsed: "true" }], ["textbox", { id: s + "commandline-command", class: "dactyl-commandline-command plain", flex: "1", type: "text", timeout: "100", - highlight: "Events", }]]]], + highlight: "Events" }]]]], before: [ ["toolbar", { id: statusline.statusBar.id, xmlns: "xul" }, @@ -446,7 +446,7 @@ var CommandMode = Class("CommandMode", { this.completions.clear(); if (this.history) this.history.reset(); - }, + } }); var CommandExMode = Class("CommandExMode", CommandMode, { @@ -783,7 +783,7 @@ var CommandLine = Module("commandline", { message.message; this._messageHistory.add(update({ highlight: highlightGroup }, message)); return message.message; - } + }; if (flags & this.APPEND_TO_MESSAGES) data = appendToMessages(data); diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 933e74f7..042444be 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1647,7 +1647,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { if (args["+purgecaches"]) cache.flush(); - util.delay(() => { util.rehash(args) }); + util.delay(() => { util.rehash(args); }); }, { argCount: "0", // FIXME diff --git a/common/content/editor.js b/common/content/editor.js index 13f87c57..ab7fe27d 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -804,7 +804,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), { this.editor.endTransaction(); this.editor = null; } - }, + } }; Map.types["operator"] = { preExecute: function preExecute(args) { diff --git a/common/content/hints.js b/common/content/hints.js index 6b1989fc..3c1cb50b 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -741,7 +741,7 @@ var HintSession = Class("HintSession", CommandMode, { updateStatusline: function _updateStatusline() { statusline.inputBuffer = (this.escapeNumbers ? "\\" : "") + (this.hintNumber ? this.getHintString(this.hintNumber) : ""); - }, + } }); var Hints = Module("hints", { diff --git a/common/content/marks.js b/common/content/marks.js index 50808a0a..5e5e9cf6 100644 --- a/common/content/marks.js +++ b/common/content/marks.js @@ -286,7 +286,7 @@ var Marks = Module("marks", { return; } } - }, + } }, { markToString: function markToString(name, mark) { let tab = mark.tab && mark.tab.get(); diff --git a/common/content/modes.js b/common/content/modes.js index 119866ba..8ca791fc 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -350,7 +350,7 @@ var Modes = Module("modes", { if (stack && stack.pop) for (let { obj, prop, value, test } of values(this.topOfStack.saved)) if (!test || !test(stack, prev)) - dactyl.trapErrors(function () { obj[prop] = value }); + dactyl.trapErrors(function () { obj[prop] = value; }); this.show(); diff --git a/common/content/quickmarks.js b/common/content/quickmarks.js index da09b2ee..ef29c299 100644 --- a/common/content/quickmarks.js +++ b/common/content/quickmarks.js @@ -172,7 +172,7 @@ var QuickMarks = Module("quickmarks", { quickmarks.list(args[0] || ""); }, { argCount: "?", - completer: function (context) completion.quickmark(context), + completer: function (context) completion.quickmark(context) }); }, completion: function initCompletion() { diff --git a/common/modules/addons.jsm b/common/modules/addons.jsm index 6e7b32ae..59575f23 100644 --- a/common/modules/addons.jsm +++ b/common/modules/addons.jsm @@ -17,7 +17,7 @@ lazyRequire("template", ["template"]); var callResult = function callResult(method, ...args) { return function (result) { result[method].apply(result, args); }; -} +}; var listener = function listener(action, event) function addonListener(install) { @@ -218,7 +218,7 @@ var Addon = Class("Addon", { node.removeChild(node.firstChild); DOM(node).append(isArray(xml) ? xml : DOM.DOMString(xml)); - } + }; update("name", template.icon({ icon: this.iconURL }, this.name)); this.nodes.version.textContent = this.version; @@ -431,7 +431,7 @@ var Addons = Module("addons", { if (command.actions) command.actions(list, this.modules); else - list.forEach(addon => { command.action.call(this.modules, addon, args.bang) }); + list.forEach(addon => { command.action.call(this.modules, addon, args.bang); }); })); }, { argCount: "?", // FIXME: should be "1" diff --git a/common/modules/base.jsm b/common/modules/base.jsm index bf858128..55bcaa62 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -107,7 +107,7 @@ defineModule.dump = function dump_(...args) { dump(String.replace(msg, /\n?$/, "\n") .replace(/^./gm, JSMLoader.name + ": $&")); } -} +}; defineModule.modules = []; defineModule.time = function time(major, minor, func, self, ...args) { let time = Date.now(); @@ -123,7 +123,7 @@ defineModule.time = function time(major, minor, func, self, ...args) { JSMLoader.times.add(major, minor, Date.now() - time); return res; -} +}; function endModule() { defineModule.prefix = defineModule.prefix.slice(0, -2); @@ -230,7 +230,7 @@ this.lazyRequire("util", ["FailedAssertion", "util"]); if (typeof Symbol == "undefined") this.Symbol = { - iterator: "@@iterator", + iterator: "@@iterator" }; literal.files = {}; @@ -382,7 +382,7 @@ deprecated.warn = function warn(func, name, alternative, frame) { if (!func.seenCaller.add(filename)) util.dactyl(func).warn([util.urlPath(filename), frame.lineNumber, " "].join(":") + _("warn.deprecated", name, alternative)); -} +}; /** * Iterates over all of the top-level, iterable property names of an @@ -430,7 +430,7 @@ Object.defineProperty(RealSet.prototype, "add", { let res = this.has(val); Set_add.apply(this, arguments); return res; - }, + } }); Object.defineProperty(RealSet.prototype, "difference", { @@ -438,7 +438,7 @@ Object.defineProperty(RealSet.prototype, "difference", { writable: true, value: function RealSet_difference(set) { return new RealSet(i for (i of this) if (!set.has(i))); - }, + } }); Object.defineProperty(RealSet.prototype, "intersection", { @@ -446,7 +446,7 @@ Object.defineProperty(RealSet.prototype, "intersection", { writable: true, value: function RealSet_intersection(set) { return new RealSet(i for (i of this) if (set.has(i))); - }, + } }); Object.defineProperty(RealSet.prototype, "union", { @@ -457,7 +457,7 @@ Object.defineProperty(RealSet.prototype, "union", { for (let item of set) res.add(item); return res; - }, + } }); /** @@ -598,7 +598,7 @@ function curry(fn, length, self, acc) { return fn.apply(self || this, args); return curry(fn, length, self || this, args); - }; + } curried.realName = fn.realName || fn.name; return curried; } @@ -607,7 +607,7 @@ var bind = function bind(meth, self, ...args) { let func = callable(meth) ? meth : self[meth]; return apply(func, "bind", [self].concat(args)); -} +}; /** * Returns true if both arguments are functions and @@ -787,11 +787,11 @@ function update(target) { func.superapply = function superapply(self, args) { let meth = Object.getPrototypeOf(target)[k]; return meth && meth.apply(self, args); - } + }; func.supercall = function supercall(self, ...args) { return func.superapply(self, args); - } + }; } } @@ -927,7 +927,7 @@ Class.extend = function extend(subclass, superclass, overrides) { if (superclass.prototype.constructor === objproto.constructor) superclass.prototype.constructor = superclass; -} +}; /** * Memoizes the value of a class property to the value returned by @@ -1101,7 +1101,7 @@ Class.prototype = { func.supercall = function supercall(self, ...args) { return func.superapply(self, args); - } + }; } } @@ -1143,7 +1143,7 @@ var closureHooks = { if (hasOwnProperty(target._closureCache, prop)) return target._closureCache[prop]; - let p = target[prop] + let p = target[prop]; if (callable(p)) return target._closureCache[prop] = p.bind(target); return p; @@ -1213,7 +1213,7 @@ function XPCOMShim(interfaces) { }); return (interfaces || []).reduce((shim, iface) => shim.QueryInterface(Ci[iface]), ip.data); -}; +} let stub = Class.Property({ configurable: true, enumerable: false, @@ -1313,7 +1313,7 @@ Module.INIT = { modules.dactyl.registerObservers(module); } } -} +}; /** * @class Struct @@ -1336,7 +1336,7 @@ function Struct(...args) { const Struct = Class(className || "Struct", StructBase, { length: args.length, - members: Ary(args).map((v, k) => [v, k]).toObject(), + members: Ary(args).map((v, k) => [v, k]).toObject() }); args.forEach(function (name, i) { Struct.prototype.__defineGetter__(name, function () this[i]); @@ -1606,6 +1606,7 @@ update(iter, { return false; return true; }, + some: function every(iter, pred, self) { pred = pred || util.identity; for (let elem of iter) @@ -1733,7 +1734,7 @@ const Iter = Class("Iter", { "Here you go:\n\n" + Error().stack); throw Error("Iter object used as a pre-ES6 iterator"); - }, + } }); iter.Iter = Iter; @@ -1956,7 +1957,7 @@ Object.defineProperty(Class.prototype, "closure", if (false) var array = Class("array", Ary, { - init: deprecated("Ary", function init() { init.superapply(arguments) }) + init: deprecated("Ary", function init() { init.superapply(arguments); }) }); else array = Ary; diff --git a/common/modules/bookmarkcache.jsm b/common/modules/bookmarkcache.jsm index ac263ae1..90a7dc80 100644 --- a/common/modules/bookmarkcache.jsm +++ b/common/modules/bookmarkcache.jsm @@ -55,7 +55,7 @@ update(Bookmark.prototype, { return res.reverse(); } -}) +}); Bookmark.prototype.members.uri = Bookmark.prototype.members.url; Bookmark.setter = function (key, func) this.prototype.__defineSetter__(key, func); Bookmark.setter("url", function (val) { this.uri = isString(val) ? newURI(val) : val; }); diff --git a/common/modules/bootstrap.jsm b/common/modules/bootstrap.jsm index 36e91e6f..5736d038 100644 --- a/common/modules/bootstrap.jsm +++ b/common/modules/bootstrap.jsm @@ -13,7 +13,7 @@ this["import"] = function import_(obj) { for (let key of Object.getOwnPropertyNames(obj)) Object.defineProperty(res, key, Object.getOwnPropertyDescriptor(obj, key)); return res; -} +}; if (typeof TextEncoder == "undefined") Components.utils.importGlobalProperties(["TextEncoder", "TextDecoder"]); diff --git a/common/modules/buffer.jsm b/common/modules/buffer.jsm index 532bf848..dfaae61f 100644 --- a/common/modules/buffer.jsm +++ b/common/modules/buffer.jsm @@ -728,7 +728,7 @@ var Buffer = Module("Buffer", { return !b || a[0] == b[0] && a[1] == b[1] || a[0] != b[0] && a[1] != b[1]; - } + }; let link = DOM("link[href][rev=canonical], \ link[href][rel=shortlink]", doc) @@ -749,7 +749,7 @@ var Buffer = Module("Buffer", { link[href][rel=shortlink]", this.doc) .each(elem => { overlay.getData(elem, "link-check", - () => [elem.href, this.pageURI.spec]) + () => [elem.href, this.pageURI.spec]); }); }, @@ -1264,7 +1264,7 @@ var Buffer = Module("Buffer", { encoder.init(doc, "text/unicode", encoder.OutputRaw|encoder.OutputPreformatted); OS.File.writeAtomic(file.path, encoder.encodeToString()) - .then(() => { resolve([file, true]) }) + .then(() => { resolve([file, true]); }) .catch(reject); } else { diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm index 265f235c..266bc3b8 100644 --- a/common/modules/commands.jsm +++ b/common/modules/commands.jsm @@ -1356,7 +1356,7 @@ var Commands = Module("commands", { } if (complete) - var context = complete.fork(command.name).fork("opts", len);; + var context = complete.fork(command.name).fork("opts", len); if (!complete || /(\w|^)[!\s]/.test(str)) args = command.parseArgs(args, context, { count: count, bang: bang }); @@ -1641,7 +1641,7 @@ var Commands = Module("commands", { description: "The argument completion function", completer: function (context) [[k, ""] for ([k, v] of iter(config.completers))], type: CommandOption.STRING, - validator: function (arg) arg in config.completers || /^custom,/.test(arg), + validator: function (arg) arg in config.completers || /^custom,/.test(arg) }, { names: ["-description", "-desc", "-d"], diff --git a/common/modules/completion.jsm b/common/modules/completion.jsm index aa8845d8..6e132907 100644 --- a/common/modules/completion.jsm +++ b/common/modules/completion.jsm @@ -1189,7 +1189,7 @@ var Completion = Module("completion", { let builtin = Object.keys(Cc) .filter(k => k.startsWith(services.AUTOCOMPLETE)) .map(key => { - let name = key.substr(services.AUTOCOMPLETE.length) + let name = key.substr(services.AUTOCOMPLETE.length); return ["native:" + name, _("autocomplete.description", name)]; }); diff --git a/common/modules/contexts.jsm b/common/modules/contexts.jsm index 284e425c..c46ba7f0 100644 --- a/common/modules/contexts.jsm +++ b/common/modules/contexts.jsm @@ -62,8 +62,7 @@ var Group = Class("Group", { get toStringParams() [this.name], - get builtin() this.modules.contexts.builtinGroups.indexOf(this) >= 0, - + get builtin() this.modules.contexts.builtinGroups.indexOf(this) >= 0 }, { compileFilter: function (patterns, default_=false) { function siteFilter(uri) { diff --git a/common/modules/dom.jsm b/common/modules/dom.jsm index 8d3fce53..1e76db2d 100644 --- a/common/modules/dom.jsm +++ b/common/modules/dom.jsm @@ -329,7 +329,7 @@ var DOM = Class("DOM", { let v = callable(val) ? val.call(thisObj || this, elem, i) : val; highlight[(v == null ? highlight.has(hl) : !v) ? "remove" : "add"](hl); - }), + }) }; }, @@ -952,7 +952,7 @@ var DOM = Class("DOM", { fix(DOM(this.document.defaultView)); }); - }, + } }, { /** * Creates an actual event from a pseudo-event object. @@ -1841,8 +1841,8 @@ var DOM = Class("DOM", { iterateNext: function () result.iterateNext(), get resultType() result.resultType, get snapshotLength() result.snapshotLength, - snapshotItem: function (i) result.snapshotItem(i), - } + snapshotItem: function (i) result.snapshotItem(i) + }; if (asIterator) res[Symbol.iterator] = function* () { let elem; @@ -1889,7 +1889,7 @@ var DOM = Class("DOM", { }, namespaceNames: Class.Memoize(function () - iter(this.namespaces).map(([k, v]) => ([v, k])).toObject()), + iter(this.namespaces).map(([k, v]) => ([v, k])).toObject()) }); Object.keys(DOM.Event.types).forEach(function (event) { diff --git a/common/modules/downloads.jsm b/common/modules/downloads.jsm index f3720824..dbe69339 100644 --- a/common/modules/downloads.jsm +++ b/common/modules/downloads.jsm @@ -146,7 +146,7 @@ var Download = Class("Download", { }, _compare: { - active: (a, b) => a.active - b.active, + active: (a, b) => a.active - b.active, complete: (a, b) => a.percentComplete - b.percentComplete, date: (a, b) => a.startTime - b.startTime, filename: (a, b) => String.localeCompare(a.targetFile.leafName, b.targetFile.leafName), @@ -388,7 +388,7 @@ var DownloadList = Class("DownloadList", onDownloadChanged: function onDownloadChanged(download) { if (this.downloads.has(download)) { - download = this.downloads.get(download) + download = this.downloads.get(download); download.updateStatus(); download.updateProgress(); diff --git a/common/modules/highlight.jsm b/common/modules/highlight.jsm index 6f15826b..8a6f04b4 100644 --- a/common/modules/highlight.jsm +++ b/common/modules/highlight.jsm @@ -37,7 +37,7 @@ Highlight.liveProperty = function (name, prop) { if (this.onChange) this.onChange(); }); -} +}; Highlight.liveProperty("agent"); Highlight.liveProperty("extends", "css"); Highlight.liveProperty("value", "css"); diff --git a/common/modules/io.jsm b/common/modules/io.jsm index 95d242cd..adebcf55 100644 --- a/common/modules/io.jsm +++ b/common/modules/io.jsm @@ -976,7 +976,7 @@ unlet s:cpo_save context.anchored = false; context.keys = { text: util.identity, - description: charset => io.charsetTitle(charset), + description: charset => io.charsetTitle(charset) }; context.completions = io.charsets; }; @@ -1034,7 +1034,7 @@ unlet s:cpo_save isDirectory: function () s.substr(-1) == "/", leafName: /([^\/]*)\/?$/.exec(s)[1] } - for (s of io.listJar(uri.JARFile, getDir(uri.JAREntry)))] + for (s of io.listJar(uri.JARFile, getDir(uri.JAREntry)))]; }; else context.generate = function generate_file() { diff --git a/common/modules/javascript.jsm b/common/modules/javascript.jsm index 42067822..0e821f90 100644 --- a/common/modules/javascript.jsm +++ b/common/modules/javascript.jsm @@ -641,8 +641,7 @@ var JavaScript = Module("javascript", { .concat([k.substr(3) for (k of keys(Ci)) if (/^nsI/.test(k))]) .concat(this.magicalNames) .filter(k => k in this.window)); - }), - + }) }, { EVAL_TMP: "__dactyl_eval_tmp", diff --git a/common/modules/main.jsm b/common/modules/main.jsm index cbfafec2..15af6260 100644 --- a/common/modules/main.jsm +++ b/common/modules/main.jsm @@ -186,7 +186,7 @@ var Modules = function Modules(window) { modules.plugins = create(modules); modules.modules = modules; return modules; -} +}; config.loadStyles(); diff --git a/common/modules/options.jsm b/common/modules/options.jsm index 702a8e74..7278db83 100644 --- a/common/modules/options.jsm +++ b/common/modules/options.jsm @@ -442,7 +442,7 @@ var Option = Class("Option", { SCOPE_BOTH: 3, has: { - toggleAll: function toggleAll() toggleAll.supercall(this, "all") ^ !!toggleAll.superapply(this, arguments), + toggleAll: function toggleAll() toggleAll.supercall(this, "all") ^ !!toggleAll.superapply(this, arguments) }, parseRegexp: function parseRegexp(value, result, flags) { @@ -480,7 +480,7 @@ var Option = Class("Option", { filter: filter, result: result !== undefined ? result : !bang, toString: function toString() this.bang + Option.quote(this.filter, /:/) + - (typeof this.result === "boolean" ? "" : ":" + quote(this.result)), + (typeof this.result === "boolean" ? "" : ":" + quote(this.result)) }); }, @@ -575,7 +575,7 @@ var Option = Class("Option", { parseKey: { number: Number, - boolean: function boolean(value) value == "true" || value == true ? true : false, + boolean: function boolean(value) value == "true" || value == true ? true : false }, testValues: { diff --git a/common/modules/overlay.jsm b/common/modules/overlay.jsm index 86a59661..6318021b 100644 --- a/common/modules/overlay.jsm +++ b/common/modules/overlay.jsm @@ -342,7 +342,7 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen if (!event || !overlay.onWindowVisible || window != util.topWindow(window)) util.trapErrors("visible", obj, window); else - overlay.onWindowVisible.push(function () { obj.visible(window) }); + overlay.onWindowVisible.push(function () { obj.visible(window); }); } if (obj.load) diff --git a/common/modules/prefs.jsm b/common/modules/prefs.jsm index 5858d9d3..190e12a1 100644 --- a/common/modules/prefs.jsm +++ b/common/modules/prefs.jsm @@ -35,7 +35,7 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]) __proto__: this, get original() this.constructor(this.ORIGINAL + this.root), get restore() this.constructor(this.RESTORE + this.root), - get saved() this.constructor(this.SAVED + this.root), + get saved() this.constructor(this.SAVED + this.root) }); if (!defaults) @@ -414,10 +414,10 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]) yield option; } - }; + } return template.options(_("pref.hostPreferences", config.host), prefs.call(this)); - }, + } }, { }, { completion: function init_completion(dactyl, modules) { diff --git a/common/modules/promises.jsm b/common/modules/promises.jsm index a7e60aac..974e6d6a 100644 --- a/common/modules/promises.jsm +++ b/common/modules/promises.jsm @@ -21,7 +21,7 @@ function withCallbacks(fn) { function reject(arg) { deferred.reject(arg); } fn.apply(this, [[resolve, reject, deferred]].concat(args)); return deferred.promise; - } + }; } function CancelablePromise(executor, oncancel) { @@ -111,7 +111,7 @@ var Promises = Module("Promises", { task: function task(fn) { return function task_(...args) { return Task.spawn(fn.bind.apply(fn, [this].concat(args))); - } + }; }, /** @@ -155,7 +155,7 @@ var Promises = Module("Promises", { * @param {function} fn The function to wrap. * @returns {Promise} */ - withCallbacks: withCallbacks, + withCallbacks: withCallbacks }); endModule(); diff --git a/common/modules/sanitizer.jsm b/common/modules/sanitizer.jsm index b9279392..3956d87f 100644 --- a/common/modules/sanitizer.jsm +++ b/common/modules/sanitizer.jsm @@ -292,7 +292,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef "quit-application-granted": function (subject, data) { if (this.runAtShutdown && !this.sanitizeItems(null, Range(), null, "shutdown")) this.ranAtShutdown = true; - }, + } }, /** @@ -582,7 +582,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef context.completions = Sanitizer.COMMANDS; break; } - }, + } }); }, completion: function initCompletion(dactyl, modules, window) { diff --git a/common/modules/storage.jsm b/common/modules/storage.jsm index d545d692..783011d0 100644 --- a/common/modules/storage.jsm +++ b/common/modules/storage.jsm @@ -376,7 +376,7 @@ var Storage = Module("Storage", { if (obj.privateData && obj.clone) return obj.clone(this); return obj; - }, + } }, { Replacer: { skipXpcom: function skipXpcom(key, val) val instanceof Ci.nsISupports ? null : val @@ -803,7 +803,7 @@ var File = Class("File", { return File.DoesNotExist(e); } return path; - }, + } }); { @@ -891,7 +891,7 @@ var AsyncFile = Class("AsyncFile", File, { */ readDirectory: function readDirectory(callback) { let iter = new OS.File.DirectoryIterator(dir); - let close = () => { iter.close() }; + let close = () => { iter.close(); }; return iter.forEach(callback) .then(close, close); @@ -911,7 +911,7 @@ var AsyncFile = Class("AsyncFile", File, { moveTo: function moveTo(path, options) { return OS.File.move(this.path, path, options); - }, + } }); for (let m of ["makeDir", diff --git a/common/modules/styles.jsm b/common/modules/styles.jsm index 5f5d17fd..f612b7e9 100644 --- a/common/modules/styles.jsm +++ b/common/modules/styles.jsm @@ -244,7 +244,7 @@ var Hive = Class("Hive", { } this.sheets = this.sheets.filter(s => matches.indexOf(s) == -1); return matches.length; - }, + } }); /** @@ -374,7 +374,7 @@ var Styles = Module("Styles", { let type = services.stylesheet[agent ? "AGENT_SHEET" : "USER_SHEET"]; if (services.stylesheet.sheetRegistered(uri, type)) services.stylesheet.unregisterSheet(uri, type); - }, + } }, { append: function (dest, src, sort) { let props = {}; @@ -554,7 +554,7 @@ var Styles = Module("Styles", { */ quote: function quote(str) { return '"' + str.replace(/([\\"])/g, "\\$1").replace(/\n/g, "\\00000a") + '"'; - }, + } }, { commands: function initCommands(dactyl, modules, window) { const { commands, contexts, styles } = modules; @@ -670,7 +670,7 @@ var Styles = Module("Styles", { { name: ["dels[tyle]"], desc: "Remove a user style sheet", - action: function (sheet) sheet.remove(), + action: function (sheet) sheet.remove() } ].forEach(function (cmd) { commands.add(cmd.name, cmd.desc, diff --git a/common/modules/template.jsm b/common/modules/template.jsm index 1eef606a..981ddfc6 100644 --- a/common/modules/template.jsm +++ b/common/modules/template.jsm @@ -459,7 +459,7 @@ var Template = Module("Template", { let source = this.sourceLink(frame); source[1]["dactyl:hint"] = source[2]; return source; - } + }; return ["table", {}, format.headings ? ["thead", { highlight: "UsageHead" }, diff --git a/common/modules/util.jsm b/common/modules/util.jsm index 8b61b985..a98a71bf 100644 --- a/common/modules/util.jsm +++ b/common/modules/util.jsm @@ -59,7 +59,7 @@ var wrapCallback = function wrapCallback(fn, isEvent) { }; fn.wrapper.wrapped = fn; return fn.wrapper; -} +}; var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), { Magic: Magic, diff --git a/common/tests/functional/dactyl.jsm b/common/tests/functional/dactyl.jsm index d738da63..70b661ba 100644 --- a/common/tests/functional/dactyl.jsm +++ b/common/tests/functional/dactyl.jsm @@ -52,12 +52,12 @@ function Controller(controller) { this._countBeep = () => { this.beepCount++; - } + }; this.errors = []; this._countError = (message, highlight) => { if (/\b(Error|Warning)Msg\b/.test(highlight)) this.errors.push(String(message)); - } + }; this.modules.dactyl.registerObserver("beep", this._countBeep); this.modules.dactyl.registerObserver("echoLine", this._countError); this.modules.dactyl.registerObserver("echoMultiline", this._countError); diff --git a/pentadactyl/content/config.js b/pentadactyl/content/config.js index d0613cac..a8b5740f 100644 --- a/pentadactyl/content/config.js +++ b/pentadactyl/content/config.js @@ -78,8 +78,7 @@ var Config = Module("config", ConfigBase, { } } }; - }, - + } }, { }, { commands: function initCommands(dactyl, modules, window) {