diff --git a/common/content/autocommands.js b/common/content/autocommands.js index 74f8a614..8e16deb0 100644 --- a/common/content/autocommands.js +++ b/common/content/autocommands.js @@ -187,7 +187,7 @@ const AutoCommands = Module("autocommands", { autocommands.remove(event, regex); // remove all } else - autocommands.list(event, regex); // list all + autocommands.list(event, regex); // list all } }, { bang: true, diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js index 23bb9eb3..61a53e55 100644 --- a/common/content/bookmarks.js +++ b/common/content/bookmarks.js @@ -325,7 +325,7 @@ const Bookmarks = Module("bookmarks", { let url = args.length == 0 ? buffer.URL : args[0]; let title = args["-title"] || (args.length == 0 ? buffer.title : null); let keyword = args["-keyword"] || null; - let tags = args["-tags"] || []; + let tags = args["-tags"] || []; if (bookmarks.add(false, title, url, keyword, tags, args.bang)) { let extra = (title == url) ? "" : " (" + title + ")"; diff --git a/common/content/buffer.js b/common/content/buffer.js index 3765f7b0..530652fb 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1349,7 +1349,7 @@ const Buffer = Module("buffer", { return { text: [i + ": " + (tab.label || "(Untitled)"), i + ": " + url], - url: url, + url: url, indicator: indicator, icon: tab.image || DEFAULT_FAVICON }; diff --git a/common/content/commandline.js b/common/content/commandline.js index d81e6b9e..285ce083 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -133,7 +133,7 @@ const CommandLine = Module("commandline", { // we need to save the mode which were in before opening the command line // this is then used if we focus the command line again without the "official" // way of calling "open" - this._currentExtendedMode = null; // the extended mode which we last openend the command line for + this._currentExtendedMode = null; // the extended mode which we last openend the command line for this._currentPrompt = null; this._currentCommand = null; @@ -640,7 +640,7 @@ const CommandLine = Module("commandline", { // user pressed to carry out a command // user pressing is handled in the global onEscape - // FIXME: should trigger "cancel" event + // FIXME: should trigger "cancel" event if (events.isAcceptKey(key)) { let mode = this._currentExtendedMode; // save it here, as modes.pop() resets it this._keepCommand = !userContext.hidden_option_no_command_afterimage; @@ -1592,9 +1592,9 @@ const ItemList = Class("ItemList", { this._gradient = template.gradient("GradientLeft", "GradientRight"); this._items = null; - this._startIndex = -1; // The index of the first displayed item - this._endIndex = -1; // The index one *after* the last displayed item - this._selIndex = -1; // The index of the currently selected element + this._startIndex = -1; // The index of the first displayed item + this._endIndex = -1; // The index one *after* the last displayed item + this._selIndex = -1; // The index of the currently selected element this._div = null; this._divNodes = {}; this._minHeight = 0; diff --git a/common/content/commands.js b/common/content/commands.js index 03315902..4e00a462 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -570,9 +570,9 @@ const Commands = Module("commands", { if (!argCount) argCount = "*"; - var args = []; // parsed options + var args = []; // parsed options args.__iterator__ = function () array.iteritems(this); - args.string = str; // for access to the unparsed string + args.string = str; // for access to the unparsed string args.literalArg = ""; // FIXME! @@ -712,7 +712,7 @@ const Commands = Module("commands", { matchOpts(sub); if (complete) { - if (argCount == "0" || args.length > 0 && (/[1?]/.test(argCount))) + if (argCount == "0" || args.length > 0 && (/[1?]/.test(argCount))) complete.highlight(i, sub.length, "SPELLCHECK"); } @@ -776,7 +776,7 @@ const Commands = Module("commands", { fail("E471: Argument required"); } else if (args.length == 1 && (argCount == "0") || - args.length > 1 && /^[01?]$/.test(argCount)) + args.length > 1 && /^[01?]$/.test(argCount)) fail("E488: Trailing characters"); return args; diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 7a77679d..f7e98a7b 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1002,8 +1002,8 @@ const Dactyl = Module("dactyl", { * failure. * * @param {boolean} condition The condition to test. - * @param {string} message The message to present to the - * user on failure. + * @param {string} message The message to present to the + * user on failure. */ assert: function (condition, message) { if (!condition) diff --git a/common/content/events.js b/common/content/events.js index b1e92a00..f054d6dd 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -67,10 +67,10 @@ const Events = Module("events", { } this._input = { - buffer: "", // partial command storage - pendingMotionMap: null, // e.g. "d{motion}" if we wait for a motion of the "d" command - pendingArgMap: null, // pending map storage for commands like m{a-z} - count: null // parsed count from the input buffer + buffer: "", // partial command storage + pendingMotionMap: null, // e.g. "d{motion}" if we wait for a motion of the "d" command + pendingArgMap: null, // pending map storage for commands like m{a-z} + count: null // parsed count from the input buffer }; // load all macros @@ -283,7 +283,7 @@ const Events = Module("events", { let wasFeeding = this.feedingKeys; this.feedingKeys = true; this.duringFeed = this.duringFeed || []; - let wasQuiet = commandline.quiet; + let wasQuiet = commandline.quiet; if (quiet) commandline.quiet = quiet; @@ -338,9 +338,9 @@ const Events = Module("events", { * The pseudo-event object (such as may be retrieved from events.fromString) * should have any properties you want the event to have. * - * @param {Document} doc The DOM document to associate this event with - * @param {Type} type The type of event (keypress, click, etc.) - * @param {Object} opts The pseudo-event. + * @param {Document} doc The DOM document to associate this event with + * @param {Type} type The type of event (keypress, click, etc.) + * @param {Object} opts The pseudo-event. */ create: function (doc, type, opts) { var DEFAULTS = { @@ -428,7 +428,7 @@ const Events = Module("events", { modifier = modifier.toUpperCase(); keyname = keyname.toLowerCase(); - if (keyname && !(keyname.length == 1 && modifier.length == 0 || // disallow <> and + if (keyname && !(keyname.length == 1 && modifier.length == 0 || // disallow <> and !(keyname.length == 1 || this._key_code[keyname] || keyname == "nop" || /mouse$/.test(keyname)))) { // disallow evt_obj.ctrlKey = /C-/.test(modifier); evt_obj.altKey = /A-/.test(modifier); @@ -555,7 +555,7 @@ const Events = Module("events", { // or if the shift has been forced for a non-alphabetical character by the user while :map-ping if ((key != key.toLowerCase() && (event.ctrlKey || event.altKey || event.metaKey)) || event.dactylShift) modifier += "S-"; - else if (modifier.length == 0) + else if (modifier.length == 0) return key; } } diff --git a/common/content/hints.js b/common/content/hints.js index c5e1d085..fc5886dd 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -13,17 +13,17 @@ const Hints = Module("hints", { init: function () { this._hintMode = null; - this._submode = ""; // used for extended mode, can be "o", "t", "y", etc. - this._hintString = ""; // the typed string part of the hint is in this string - this._hintNumber = 0; // only the numerical part of the hint - this._usedTabKey = false; // when we used to select an element + this._submode = ""; // used for extended mode, can be "o", "t", "y", etc. + this._hintString = ""; // the typed string part of the hint is in this string + this._hintNumber = 0; // only the numerical part of the hint + this._usedTabKey = false; // when we used to select an element this.prevInput = ""; // record previous user input type, "text" || "number" - this._extendedhintCount = null; // for the count argument of Mode#action (extended hint only) + this._extendedhintCount = null; // for the count argument of Mode#action (extended hint only) this._pageHints = []; this._validHints = []; // store the indices of the "hints" array with valid elements - this._activeTimeout = null; // needed for hinttimeout > 0 + this._activeTimeout = null; // needed for hinttimeout > 0 this._canUpdate = false; // keep track of the documents which we generated the hints for @@ -153,10 +153,10 @@ const Hints = Module("hints", { * * Only called by {@link #_generate}. * - * @param {Object} elem The element. - * @param {number} leftPos The left offset of the image. - * @param {number} topPos The top offset of the image. - * @returns [leftPos, topPos] The updated offsets. + * @param {Object} elem The element. + * @param {number} leftPos The left offset of the image. + * @param {number} topPos The top offset of the image. + * @returns [leftPos, topPos] The updated offsets. */ _getAreaOffset: function (elem, leftPos, topPos) { try { @@ -834,7 +834,7 @@ const Hints = Module("hints", { case mappings.getMapLeader(): hints.escNumbers = !hints.escNumbers; if (hints.escNumbers && this._usedTabKey) // this._hintNumber not used normally, but someone may wants to toggle - this._hintNumber = 0; // s ? this._reset. Prevent to show numbers not entered. + this._hintNumber = 0; // s ? this._reset. Prevent to show numbers not entered. this._updateStatusline(); return; diff --git a/common/content/javascript.js b/common/content/javascript.js index 741753a7..34418d67 100644 --- a/common/content/javascript.js +++ b/common/content/javascript.js @@ -139,7 +139,7 @@ const JavaScript = Module("javascript", { // Todo: Fix these one-letter variable names. this._i = 0; - this._c = ""; // Current index and character, respectively. + this._c = ""; // Current index and character, respectively. // Reuse the old stack. if (this._str && filter.substr(0, this._str.length) == this._str) { @@ -180,7 +180,7 @@ const JavaScript = Module("javascript", { // A "." or a "[" dereferences the last "statement" and effectively // joins it to this logical statement. if ((this._c == "." || this._c == "[") && /[\w$\])"']/.test(this._lastNonwhite) - || this._lastNonwhite == "." && /[a-zA-Z_$]/.test(this._c)) + || this._lastNonwhite == "." && /[a-zA-Z_$]/.test(this._c)) this._top.statements.pop(); switch (this._c) { diff --git a/common/content/mappings.js b/common/content/mappings.js index fc67459b..c12596f0 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -555,7 +555,7 @@ const Mappings = Module("mappings", { }); } - addMapCommands("", [modes.NORMAL, modes.VISUAL], ""); + addMapCommands("", [modes.NORMAL, modes.VISUAL], ""); for (let mode in modes.mainModes) if (mode.char && !commands.get(mode.char + "map", true)) diff --git a/common/content/modes.js b/common/content/modes.js index 922238b8..d502ef02 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -245,7 +245,7 @@ const Modes = Module("modes", { get passAllKeys() this._passAllKeys, set passAllKeys(value) { this._passAllKeys = value; this.show(); }, - get isRecording() this._isRecording, + get isRecording() this._isRecording, set isRecording(value) { this._isRecording = value; this.show(); }, get isReplaying() this._isReplaying, diff --git a/common/content/options.js b/common/content/options.js index 08976352..8872c35b 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -963,7 +963,7 @@ const Options = Module("options", { _loadPreference: function (name, forcedDefault, defaultBranch) { let defaultValue = null; // XXX - if (forcedDefault != null) // this argument sets defaults for non-user settable options (like extensions.history.comp_history) + if (forcedDefault != null) // this argument sets defaults for non-user settable options (like extensions.history.comp_history) defaultValue = forcedDefault; let branch = defaultBranch ? services.get("pref").getDefaultBranch("") : services.get("pref"); diff --git a/common/modules/storage.jsm b/common/modules/storage.jsm index 895fede9..1e404a07 100644 --- a/common/modules/storage.jsm +++ b/common/modules/storage.jsm @@ -359,7 +359,7 @@ const File = Class("File", { let array = [e for (e in this.iterDirectory())]; if (sort) - array.sort(function (a, b) b.isDirectory() - a.isDirectory() || String.localeCompare(a.path, b.path)); + array.sort(function (a, b) b.isDirectory() - a.isDirectory() || String.localeCompare(a.path, b.path)); return array; },