diff --git a/common/components/protocols.js b/common/components/protocols.js index f5e3f627..52b49193 100644 --- a/common/components/protocols.js +++ b/common/components/protocols.js @@ -198,7 +198,7 @@ Shim.prototype = { QueryInterface: function (iid) { if (iid.equals(Ci.nsISecurityCheckedComponent)) throw Components.results.NS_ERROR_NO_INTERFACE; - return this + return this; }, getHelperForLanguage: function () null, getInterfaces: function (count) { diff --git a/common/content/abbreviations.js b/common/content/abbreviations.js index d04d101b..0befbf43 100644 --- a/common/content/abbreviations.js +++ b/common/content/abbreviations.js @@ -252,7 +252,7 @@ const Abbreviations = Module("abbreviations", { ], completer: function (context, args) { if (args.length == 1) - return completion.abbreviation(context, args, modes) + return completion.abbreviation(context, args, modes); else if (args["-javascript"]) return completion.javascript(context); }, diff --git a/common/content/browser.js b/common/content/browser.js index 4cec3408..fc91a144 100644 --- a/common/content/browser.js +++ b/common/content/browser.js @@ -18,7 +18,7 @@ const Browser = Module("browser", { dactyl.assert(url instanceof Ci.nsIURL); while (count-- && url.path != "/") - url.path = url.path.replace(/[^\/]+\/?$/, "") + url.path = url.path.replace(/[^\/]+\/?$/, ""); dactyl.assert(url.spec != buffer.URL); dactyl.open(url.spec); diff --git a/common/content/buffer.js b/common/content/buffer.js index 5a826409..2077d9ff 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -435,7 +435,7 @@ const Buffer = Module("buffer", { })(win || window.content); if (focusedFirst) return frames.filter(function (f) f === buffer.focusedFrame).concat( - frames.filter(function (f) f !== buffer.focusedFrame)) + frames.filter(function (f) f !== buffer.focusedFrame)); return frames; }, @@ -1357,7 +1357,7 @@ const Buffer = Module("buffer", { return; if (/^>>/.test(context.filter)) context.advance(/^>>\s*/.exec(context.filter)[0].length); - return completion.file(context) + return completion.file(context); }, literal: 0 }); @@ -1710,7 +1710,7 @@ const Buffer = Module("buffer", { mappings.add(myModes, ["zz"], "Set text zoom value of current web page", - function (count) { Buffer.setZoom(count > 1 ? count : 100, false) }, + function (count) { Buffer.setZoom(count > 1 ? count : 100, false); }, { count: true }); mappings.add(myModes, ["ZI", "zI"], @@ -1735,7 +1735,7 @@ const Buffer = Module("buffer", { mappings.add(myModes, ["zZ"], "Set full zoom value of current web page", - function (count) { Buffer.setZoom(count > 1 ? count : 100, true) }, + function (count) { Buffer.setZoom(count > 1 ? count : 100, true); }, { count: true }); // page info diff --git a/common/content/commandline.js b/common/content/commandline.js index 182ebbd7..d941d5ef 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -100,7 +100,7 @@ const CommandWidgets = Class("CommandWidgets", { get: function () { let elem = self.getGroup(obj.name, obj.value)[obj.name]; if (obj.value != null) - return [obj.value[0], obj.get ? obj.get.call(this, elem) : elem.value] + return [obj.value[0], obj.get ? obj.get.call(this, elem) : elem.value]; return null; }, set: function (val) { @@ -1181,7 +1181,7 @@ const CommandLine = Module("commandline", { dactyl.registerObserver("echoLine", observe, true); dactyl.registerObserver("echoMultiline", observe, true); function observe(str, highlight, dom) { - buffer.push(dom && !isString(str) ? util.domToString(dom) : str) + buffer.push(dom && !isString(str) ? util.domToString(dom) : str); } dactyl.trapErrors.apply(dactyl, [fn, self].concat(Array.slice(arguments, 2))); return buffer.join("\n"); diff --git a/common/content/commands.js b/common/content/commands.js index 9c41742c..91311f8a 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -723,7 +723,7 @@ const Commands = Module("commands", { let arg = /^<<(\S*)/.exec(str)[1]; let count = arg.length + 2; if (complete) - return [count, "", ""] + return [count, "", ""]; return [count, io.readHeredoc(arg), ""]; } let [count, arg, quote] = Commands.parseArg(str, null, keepQuotes); @@ -1381,14 +1381,14 @@ const Commands = Module("commands", { if (arguments.length < 2) value = io.sourcing.noExecute; io.sourcing.stack = io.sourcing.stack || {}; - io.sourcing.stack[cmd] = (io.sourcing.stack[cmd] || []).concat([value]) + io.sourcing.stack[cmd] = (io.sourcing.stack[cmd] || []).concat([value]); } commands.add(["if"], "Execute commands until the next :elseif, :else, or :endif only if the argument returns true", function (args) { io.sourcing.noExecute = !dactyl.userEval(args[0]); }, { - always: function (args) { push("if") }, + always: function (args) { push("if"); }, argCount: "1", literal: 0 }); @@ -1419,7 +1419,7 @@ const Commands = Module("commands", { "Ends a string of :if/:elseif/:else conditionals", function (args) {}, { - always: function (args) { io.sourcing.noExecute = pop("if") }, + always: function (args) { io.sourcing.noExecute = pop("if"); }, argCount: "0" }); diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 98d0d6e2..260df666 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -34,7 +34,7 @@ function deprecated(reason, fn) { deprecatedMethod.seen = { "chrome://dactyl/content/javascript.js": true }; return callable(fn) ? deprecatedMethod : Class.Property({ get: function () deprecatedMethod, - init: function (prop) { name = prop } + init: function (prop) { name = prop; } }); } @@ -622,7 +622,7 @@ const Dactyl = Module("dactyl", { if (obj instanceof Command) { tag = spec = function (cmd) <>:{cmd}; - link = function (cmd) :{cmd} + link = function (cmd) :{cmd}; args = obj.parseArgs("", CompletionContext(str || "")); } else if (obj instanceof Map && obj.count) { diff --git a/common/content/editor.js b/common/content/editor.js index 607ec239..089ff5d3 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -694,7 +694,7 @@ const Editor = Module("editor", { function (count) { dactyl.assert(!editor.isCaret); if (!count) - count = 1 + count = 1; while (count--) editor.executeCommand("cmd_paste", count); modes.pop(modes.TEXT_EDIT); diff --git a/common/content/events.js b/common/content/events.js index 16a496c1..de7f9c14 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -830,7 +830,7 @@ const Events = Module("events", { stop = true; else if (modes.main == modes.PASS_THROUGH) // let flow continue to handle these keys to cancel escape-all-keys mode - stop = !isEscape(key) && key != "" + stop = !isEscape(key) && key != ""; // handle Escape-one-key mode (Ctrl-v) else if (modes.main == modes.QUOTE) { stop = !shouldPass() && (modes.getStack(1).main !== modes.PASS_THROUGH || isEscape(key)); diff --git a/common/content/finder.js b/common/content/finder.js index 8c952594..223f5eeb 100644 --- a/common/content/finder.js +++ b/common/content/finder.js @@ -632,7 +632,7 @@ const RangeFind = Class("RangeFind", { .QueryInterface(Ci.nsISelectionController), get selection() { try { - return this.selectionController.getSelection(Ci.nsISelectionController.SELECTION_NORMAL) + return this.selectionController.getSelection(Ci.nsISelectionController.SELECTION_NORMAL); } catch (e) { return null; @@ -649,10 +649,11 @@ const RangeFind = Class("RangeFind", { }, equal: function (r1, r2) { try { - return !r1.compareBoundaryPoints(r1.START_TO_START, r2) && !r1.compareBoundaryPoints(r1.END_TO_END, r2) + return !r1.compareBoundaryPoints(r1.START_TO_START, r2) && !r1.compareBoundaryPoints(r1.END_TO_END, r2); + } + catch (e) { + return false; } - catch (e) {} - return false; }, nodeRange: function (node) { let range = node.ownerDocument.createRange(); diff --git a/common/content/hints.js b/common/content/hints.js index 56a683b3..becaadbc 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -1139,7 +1139,7 @@ const Hints = Module("hints", { validator: function (value) { let values = events.fromString(value).map(events.closure.toString); return Option.validIf(array.uniq(values).length === values.length, - "Duplicate keys not allowed") + "Duplicate keys not allowed"); } }); diff --git a/common/content/io.js b/common/content/io.js index 2e1c30f9..90201b2d 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -353,7 +353,7 @@ lookup: e.fileName = e.fileName.replace(/^(chrome|resource):.*? -> /, ""); if (e.fileName == uri.spec) e.fileName = filename; - e.echoerr = <>{e.fileName}:{e.lineNumber}: {e} + e.echoerr = <>{e.fileName}:{e.lineNumber}: {e}; } catch (e) {} throw e; diff --git a/common/content/modes.js b/common/content/modes.js index e9b7d51b..fa539ef5 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -197,7 +197,7 @@ const Modes = Module("modes", { }, delayed: [], - delay: function (callback, self) { this.delayed.push([callback, self]) }, + delay: function (callback, self) { this.delayed.push([callback, self]); }, save: function save(id, obj, prop) { if (!(id in this.boundProperties)) @@ -340,7 +340,7 @@ const Modes = Module("modes", { return val === undefined ? value : val; }, set: function (val) { - modes.save(id, this, prop) + modes.save(id, this, prop); if (desc.set) value = desc.set.call(this, val); value = !desc.set || value === undefined ? val : value; diff --git a/common/content/options.js b/common/content/options.js index c7890cb3..36c6a26c 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -61,7 +61,7 @@ const Option = Class("Option", { if (arguments.length > 3) { if (this.type == "string") defaultValue = Commands.quote(defaultValue); - this.defaultValue = this.parse(defaultValue) + this.defaultValue = this.parse(defaultValue); } // add no{option} variant of boolean {option} to this.names @@ -434,7 +434,7 @@ const Option = Class("Option", { stringmap: function (value) array.toObject( Option.splitList(value, true).map(function (v) { let [count, key, quote] = Commands.parseArg(v, /:/); - return [key, Option.dequote(v.substr(count + 1))] + return [key, Option.dequote(v.substr(count + 1))]; })), regexpmap: function (value) @@ -667,7 +667,7 @@ const Options = Module("options", { allPrefs: deprecated("Please use prefs.getNames", function allPrefs() prefs.getNames.apply(prefs, arguments)), getPref: deprecated("Please use prefs.get", function getPref() prefs.get.apply(prefs, arguments)), invertPref: deprecated("Please use prefs.invert", function invertPref() prefs.invert.apply(prefs, arguments)), - listPrefs: deprecated("Please use prefs.list", function listPrefs() { commandline.commandOutput(prefs.list.apply(prefs, arguments)) }), + listPrefs: deprecated("Please use prefs.list", function listPrefs() { commandline.commandOutput(prefs.list.apply(prefs, arguments)); }), observePref: deprecated("Please use prefs.observe", function observePref() prefs.observe.apply(prefs, arguments)), popContext: deprecated("Please use prefs.popContext", function popContext() prefs.popContext.apply(prefs, arguments)), pushContext: deprecated("Please use prefs.pushContext", function pushContext() prefs.pushContext.apply(prefs, arguments)), @@ -1192,7 +1192,7 @@ const Options = Module("options", { context.filter = Option.dequote(context.filter); context.title = ["Option Value"]; - context.quote = Commands.complQuote[Option._quote] || Commands.complQuote[""] + context.quote = Commands.complQuote[Option._quote] || Commands.complQuote[""]; // Not Vim compatible, but is a significant enough improvement // that it's worth breaking compatibility. if (isArray(newValues)) { diff --git a/common/content/quickmarks.js b/common/content/quickmarks.js index d003a6d9..d41a6719 100644 --- a/common/content/quickmarks.js +++ b/common/content/quickmarks.js @@ -185,7 +185,7 @@ const QuickMarks = Module("quickmarks", { completion.quickmark = function (context) { context.title = ["QuickMark", "URL"]; context.generate = function () Iterator(quickmarks._qmarks); - } + }; }, mappings: function () { var myModes = config.browserModes; diff --git a/common/content/tabs.js b/common/content/tabs.js index d56cdf10..4c49b583 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -37,7 +37,7 @@ const Tabs = Module("tabs", { this.tabStyle = styles.addSheet(true, "tab-strip-hiding", config.styleableChrome, (config.tabStrip.id ? "#" + config.tabStrip.id : ".tabbrowser-strip") + "{ visibility: collapse; }", - false, true) + false, true); dactyl.commands["tabs.select"] = function (event) { tabs.select(event.originalTarget.getAttribute("identifier")); diff --git a/melodactyl/content/config.js b/melodactyl/content/config.js index 25482d9e..5477d030 100644 --- a/melodactyl/content/config.js +++ b/melodactyl/content/config.js @@ -60,7 +60,7 @@ const Config = Module("config", ConfigBase, { StreamStop: "Triggered after a stream has stopped", Enter: "Triggered after Songbird starts", LeavePre: "Triggered before exiting Songbird, just before destroying each module", - Leave: "Triggered before exiting Songbird", + Leave: "Triggered before exiting Songbird" }, dialogs: { diff --git a/teledactyl/content/config.js b/teledactyl/content/config.js index 81ea7b62..0ddb016e 100644 --- a/teledactyl/content/config.js +++ b/teledactyl/content/config.js @@ -18,7 +18,7 @@ const Config = Module("config", ConfigBase, { PageLoad: "Triggered when a page gets (re)loaded/opened", Enter: "Triggered after Thunderbird starts", Leave: "Triggered before exiting Thunderbird", - LeavePre: "Triggered before exiting Thunderbird", + LeavePre: "Triggered before exiting Thunderbird" }, get browser() getBrowser(),