diff --git a/common/components/protocols.js b/common/components/protocols.js index eb011d3f..f070b2e2 100644 --- a/common/components/protocols.js +++ b/common/components/protocols.js @@ -136,7 +136,7 @@ Dactyl.prototype = { for each (let prop in ["HELP_TAGS", "FILE_MAP", "OVERLAY_MAP"]) { this[prop] = this[prop].constructor(); for (let [k, v] in Iterator(obj[prop] || {})) - this[prop][k] = v + this[prop][k] = v; } }, diff --git a/common/content/autocommands.js b/common/content/autocommands.js index a9675f42..3b43ad5a 100644 --- a/common/content/autocommands.js +++ b/common/content/autocommands.js @@ -201,7 +201,7 @@ const AutoCommands = Module("autocommands", { options: [ { names: ["-javascript", "-js"], - description: "Interperate the action as JavaScript code rather than an ex command", + description: "Interperate the action as JavaScript code rather than an ex command" } ] }); diff --git a/common/content/buffer.js b/common/content/buffer.js index a61c86a9..93b1a6aa 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1071,7 +1071,7 @@ const Buffer = Module("buffer", { else if (increment == "pages") increment = elem.clientHeight - fontSize; else - throw Error() + throw Error(); elem.scrollTop += number * increment; }, @@ -1083,7 +1083,7 @@ const Buffer = Module("buffer", { else if (increment == "pages") increment = elem.clientWidth - fontSize; else - throw Error() + throw Error(); elem.scrollLeft += number * increment; }, diff --git a/common/content/commandline.js b/common/content/commandline.js index 686d0590..4416247a 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -119,7 +119,7 @@ const CommandLine = Module("commandline", { message: document.getElementById("dactyl-message"), multilineOutput: document.getElementById("dactyl-multiline-output"), - multilineInput: document.getElementById("dactyl-multiline-input"), + multilineInput: document.getElementById("dactyl-multiline-input") }; widgets.command.inputField.QueryInterface(Ci.nsIDOMNSEditableElement); @@ -1611,7 +1611,7 @@ const ItemList = Class("ItemList", { commandline.updateOutputHeight(false, Math.max(0, this._minHeight - this._container.height)); this._container.height = this._minHeight; - this._container.height -= commandline.getSpaceNeeded() + this._container.height -= commandline.getSpaceNeeded(); commandline.updateOutputHeight(false); this.timeout(function () { this._container.height -= commandline.getSpaceNeeded(); }, 0); }, diff --git a/common/content/completion.js b/common/content/completion.js index ee53829e..9ba3d7c1 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -308,7 +308,7 @@ const CompletionContext = Class("CompletionContext", { let res = {}; function result(quote) { yield ["result", quote ? function () quote[0] + quote[1](this.text) + quote[2] - : function () this.text] + : function () this.text]; }; for (let i in iterall(this.keys, result(this.quote))) { let [k, v] = i; diff --git a/common/content/configbase.js b/common/content/configbase.js index 03fd84b0..47ecdb26 100644 --- a/common/content/configbase.js +++ b/common/content/configbase.js @@ -30,7 +30,7 @@ const ConfigBase = Class(ModuleBase, { height: {img.height}px; )); img = null; - } + }; }, styleHelp: function () { diff --git a/common/content/dactyl-overlay.js b/common/content/dactyl-overlay.js index c9e966f8..c6c7e5fb 100644 --- a/common/content/dactyl-overlay.js +++ b/common/content/dactyl-overlay.js @@ -65,7 +65,7 @@ "services", "statusline", "styles", - "template", + "template" ].forEach(modules.load); prefix.unshift("chrome://" + modules.services.get("dactyl:").name + "/content/"); diff --git a/common/content/dactyl.js b/common/content/dactyl.js index df942468..5571501f 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -327,7 +327,7 @@ const Dactyl = Module("dactyl", { return this.usereval( "(function (" + Array.slice(arguments, 0, -1).join(", ") + - ") { " + arguments[arguments.length - 1] + " })") + ") { " + arguments[arguments.length - 1] + " })"); }, // partial sixth level expression evaluation @@ -617,7 +617,7 @@ const Dactyl = Module("dactyl", { data.push(name); data.push('="'); data.push(<>{value}.toXMLString()); - data.push('"') + data.push('"'); } if (node.localName in empty) data.push(" />"); @@ -644,7 +644,7 @@ const Dactyl = Module("dactyl", { .join("\n"); addDataEntry("help.css", data.replace(/chrome:[^ ")]+\//g, "")); - let re = /(chrome:[^ ");]+\/)([^ ");]+)/g; + let m, re = /(chrome:[^ ");]+\/)([^ ");]+)/g; while ((m = re.exec(data))) chrome[m[0]] = m[2]; @@ -1520,7 +1520,7 @@ const Dactyl = Module("dactyl", { function callResult(method) { let args = Array.slice(arguments, 1); - return function (result) { result[method].apply(result, args) }; + return function (result) { result[method].apply(result, args); }; } commands.add(["exta[dd]"], @@ -1774,7 +1774,7 @@ const Dactyl = Module("dactyl", { }, { argcount: "1", completer: function (context) { - completion.toolbar(context) + completion.toolbar(context); if (filter) context.filters.push(filter); }, @@ -1966,7 +1966,7 @@ const Dactyl = Module("dactyl", { }; completion.window = function window(context) { - context.title = ["Window", "Title"] + context.title = ["Window", "Title"]; context.keys = { text: function (win) dactyl.windows.indexOf(win) + 1, description: function (win) win.document.title }; context.completions = dactyl.windows; }; diff --git a/common/content/hints.js b/common/content/hints.js index 87c6baa3..2f624c66 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -45,7 +45,7 @@ const Hints = Module("hints", { t: Mode("Follow hint in a new tab", function (elem) buffer.followLink(elem, dactyl.NEW_TAB)), b: Mode("Follow hint in a background tab", function (elem) buffer.followLink(elem, dactyl.NEW_BACKGROUND_TAB)), w: Mode("Follow hint in a new window", function (elem) buffer.followLink(elem, dactyl.NEW_WINDOW), extended), - F: Mode("Open multiple hints in tabs", function (elem) { buffer.followLink(elem, dactyl.NEW_BACKGROUND_TAB); hints.show("F") }), + F: Mode("Open multiple hints in tabs", function (elem) { buffer.followLink(elem, dactyl.NEW_BACKGROUND_TAB); hints.show("F"); }), O: Mode("Generate an ':open URL' using hint", function (elem, loc) commandline.open(":", "open " + loc, modes.EX)), T: Mode("Generate a ':tabopen URL' using hint", function (elem, loc) commandline.open(":", "tabopen " + loc, modes.EX)), W: Mode("Generate a ':winopen URL' using hint", function (elem, loc) commandline.open(":", "winopen " + loc, modes.EX)), @@ -444,7 +444,7 @@ const Hints = Module("hints", { // OK. return hit. But there's more than one hint, and // there's no tab-selected current link. Do not follow in mode 2 - dactyl.assert(options["followhints"] != 2 || this._validHints.length == 1 || this._hintNumber) + dactyl.assert(options["followhints"] != 2 || this._validHints.length == 1 || this._hintNumber); } if (!followFirst) { @@ -928,7 +928,7 @@ const Hints = Module("hints", { [0x249c, 0x24b5, "a"], [0x24b6, 0x24cf, "A"], [0x24d0, 0x24e9, "a"], [0xfb00, 0xfb06, ["ff", "fi", "fl", "ffi", "ffl", "st", "st"]], - [0xff21, 0xff3a, "A"], [0xff41, 0xff5a, "a"], + [0xff21, 0xff3a, "A"], [0xff41, 0xff5a, "a"] ].forEach(function (start, stop, val) { if (typeof a[2] != "string") for (i=start; i <= stop; i++) diff --git a/common/content/javascript.js b/common/content/javascript.js index cd26cfd8..04b33e96 100644 --- a/common/content/javascript.js +++ b/common/content/javascript.js @@ -337,7 +337,7 @@ const JavaScript = Module("javascript", { if (!isNaN(key)) return parseInt(key); if (/^[A-Z_][A-Z0-9_]*$/.test(key)) - return "" + return ""; return item; } }; @@ -363,7 +363,7 @@ const JavaScript = Module("javascript", { this.context.fork(obj[1], this._top.offset, this, this._fill, update(args, { obj: obj[0], - name: obj[1], + name: obj[1] })); if (orig) diff --git a/common/content/mappings.js b/common/content/mappings.js index 4dcc3e42..e48991f8 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -449,7 +449,7 @@ const Mappings = Module("mappings", { const opts = { completer: function (context, args) { if (args.length == 1) - return completion.userMapping(context, args, mapmodes) + return completion.userMapping(context, args, mapmodes); if (args["-javascript"]) return completion.javascript(context); if (args["-ex"]) diff --git a/common/content/options.js b/common/content/options.js index 04feb508..9285b43b 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -532,7 +532,7 @@ const Options = Module("options", { this._prefContexts = []; for (let [, pref] in Iterator(this.allPrefs(Options.OLD_SAVED))) { - let saved = Options.SAVED + pref.substr(Options.OLD_SAVED.length) + let saved = Options.SAVED + pref.substr(Options.OLD_SAVED.length); if (!this.getPref(saved)) this.setPref(saved, this.getPref(pref)); this.resetPref(pref); @@ -1155,13 +1155,13 @@ const Options = Module("options", { if (opt.operator == "-" && isarray(opt.values)) { let have = set([i.text for (i in context.allItems)]); context = context.fork("current-values", 0); - context.anchored = optcontext.anchored - context.maxItems = optcontext.maxItems + context.anchored = optcontext.anchored; + context.maxItems = optcontext.maxItems; context.filters.push(function (i) !set.has(have, i.text)); completion.optionValue(context, opt.name, opt.operator, null, function (context) { - context.generate = function () option.values.map(function (o) [o, ""]) + context.generate = function () option.values.map(function (o) [o, ""]); }); context.title = ["Current values"]; } @@ -1295,7 +1295,7 @@ const Options = Module("options", { let opt = options.parseOpt(spec); return opt.option && opt.option.privateData && (!callable(opt.option.privateData) || - opt.option.privateData(opt.values)) + opt.option.privateData(opt.values)); }) }, params.extra || {})); }); diff --git a/common/content/tabs.js b/common/content/tabs.js index d96b2cc8..59c1e1c6 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -303,7 +303,7 @@ const Tabs = Module("tabs", { return; } - let tabs = this.visibleTabs + let tabs = this.visibleTabs; if (tabs.indexOf(tab) < 0) tabs = this.allTabs; let index = tabs.indexOf(tab); diff --git a/common/modules/base.jsm b/common/modules/base.jsm index aa0a3e2f..94bec739 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -38,14 +38,14 @@ if (!Object.defineProperty) objproto.__defineGetter__.call(obj, prop, desc.get); if ("set" in desc) objproto.__defineSetter__.call(obj, prop, desc.set); - } + }; if (!Object.getOwnPropertyDescriptor) Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(obj, prop) { if (!hasOwnProperty.call(obj, prop)) return undefined; let desc = { configurable: true, - enumerable: objproto.propertyIsEnumerable.call(obj, prop), + enumerable: objproto.propertyIsEnumerable.call(obj, prop) }; var get = obj.__lookupGetter__(prop), set = obj.__lookupSetter__(prop); @@ -58,7 +58,7 @@ if (!Object.getOwnPropertyDescriptor) if (set) desc.set = set; return desc; - } + }; if (!Object.getOwnPropertyNames) Object.getOwnPropertyNames = function getOwnPropertyNames(obj) { // This is an ugly and unfortunately necessary hack. @@ -101,7 +101,7 @@ function defmodule(name, params) { } defmodule.loadLog = []; -Object.defineProperty(defmodule.loadLog, "push", { value: function (val) { dump(val + "\n"); this[this.length] = val } }); +Object.defineProperty(defmodule.loadLog, "push", { value: function (val) { dump(val + "\n"); this[this.length] = val; } }); defmodule.modules = []; defmodule.times = { all: 0 }; defmodule.time = function time(major, minor, func, self) { @@ -144,7 +144,7 @@ defmodule("base", { "endmodule", "extend", "foreach", "isarray", "isgenerator", "isinstance", "isobject", "isstring", "issubclass", "iter", "iterall", "keys", "memoize", "properties", "requiresMainThread", "set", - "update", "values", + "update", "values" ], use: ["services"] }); @@ -194,7 +194,7 @@ function properties(obj, prototypes, debugger_) { for (let key in iter) if (!prototypes || !set.add(seen, key) && obj != orig) - yield key + yield key; } } @@ -878,10 +878,10 @@ const Timer = Class("Timer", { */ function UTF8(str) { try { - return decodeURIComponent(escape(str)) + return decodeURIComponent(escape(str)); } catch (e) { - return str + return str; } } @@ -1017,7 +1017,7 @@ const array = Class("array", Array, { * @returns {Array} */ zip: function zip(ary1, ary2) { - let res = [] + let res = []; for(let [i, item] in Iterator(ary1)) res.push([item, i in ary2 ? ary2[i] : ""]); return res; diff --git a/common/modules/highlight.jsm b/common/modules/highlight.jsm index bc967faf..92644273 100644 --- a/common/modules/highlight.jsm +++ b/common/modules/highlight.jsm @@ -147,7 +147,7 @@ const Highlights = Module("Highlight", { */ selector: function (class_) { let [, hl, rest] = class_.match(/^(\w*)(.*)/); - let pattern = "[dactyl|highlight~=" + hl + "]" + let pattern = "[dactyl|highlight~=" + hl + "]"; if (this.highlight[hl] && this.highlight[hl].class != class_) pattern = this.highlight[hl].selector; return pattern + rest; @@ -318,7 +318,7 @@ const Highlights = Module("Highlight", { context.completions = array.flatten( modules.io.getRuntimeDirectories("colors").map( function (dir) dir.readDirectory().filter( - function (file) /\.vimp$/.test(file.leafName)))) + function (file) /\.vimp$/.test(file.leafName)))); }; diff --git a/pentadactyl/content/config.js b/pentadactyl/content/config.js index 65b08c85..1629809a 100644 --- a/pentadactyl/content/config.js +++ b/pentadactyl/content/config.js @@ -23,7 +23,7 @@ const Config = Module("config", ConfigBase, { ShellCmdPost: "Triggered after executing a shell command with :!cmd", Enter: "Triggered after Firefox starts", LeavePre: "Triggered before exiting Firefox, just before destroying each module", - Leave: "Triggered before exiting Firefox", + Leave: "Triggered before exiting Firefox" }, defaults: {