diff --git a/content/bookmarks.js b/content/bookmarks.js index 375cb500..b340ec5d 100644 --- a/content/bookmarks.js +++ b/content/bookmarks.js @@ -496,15 +496,14 @@ liberator.Bookmarks = function () //{{{ if (openItems) return liberator.open([i[0] for each (i in items)], liberator.NEW_TAB); - var title, url, tags, keyword, extra; var list = ":" + liberator.util.escapeHTML(liberator.commandline.getCommand()) + "
" + ""; for (let i = 0; i < items.length; i++) { - title = liberator.util.escapeHTML(liberator.util.clip(items[i][1], 50)); - url = liberator.util.escapeHTML(items[i][0]); - keyword = items[i][2]; - tags = items[i][3].join(", "); + let title = liberator.util.escapeHTML(liberator.util.clip(items[i][1], 50)); + let url = liberator.util.escapeHTML(items[i][0]); + let keyword = items[i][2]; + let tags = items[i][3].join(", "); extra = ""; if (keyword) diff --git a/content/buffer.js b/content/buffer.js index 0a494248..2fb6a16b 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -1368,7 +1368,8 @@ liberator.Buffer = function () //{{{ // url is optional viewSource: function (url, useExternalEditor) { - var url = url || liberator.buffer.URL; + url = url || liberator.buffer.URL; + if (useExternalEditor) { // TODO: make that a helper function diff --git a/content/commands.js b/content/commands.js index 18061c94..615afe15 100644 --- a/content/commands.js +++ b/content/commands.js @@ -211,7 +211,7 @@ liberator.Commands = function () //{{{ addUserCommand: function (names, description, action, extra, replace) { - var extra = extra || {}; + extra = extra || {}; extra.isUserCommand = true; description = description || "User defined command"; diff --git a/content/editor.js b/content/editor.js index fea911f6..01cdc912 100644 --- a/content/editor.js +++ b/content/editor.js @@ -151,8 +151,8 @@ liberator.Editor = function () //{{{ // mode = "i" -> add :iabbrev, :iabclear and :iunabbrev commands function addAbbreviationCommands(ch, modeDescription) { - var modeDescription = modeDescription ? " in " + modeDescription + " mode" : ""; var mode = ch || "!"; + modeDescription = modeDescription ? " in " + modeDescription + " mode" : ""; liberator.commands.add([ch ? ch + "a[bbrev]" : "ab[breviate]"], "Abbreviate a key sequence" + modeDescription, diff --git a/content/mappings.js b/content/mappings.js index bf2275a2..27af4aeb 100644 --- a/content/mappings.js +++ b/content/mappings.js @@ -198,7 +198,7 @@ liberator.Mappings = function () //{{{ } } - var modeDescription = modeDescription ? " in " + modeDescription + " mode" : ""; + modeDescription = modeDescription ? " in " + modeDescription + " mode" : ""; liberator.commands.add([ch ? ch + "m[ap]" : "map"], "Map a key sequence" + modeDescription, diff --git a/content/options.js b/content/options.js index 78a364d0..0e7320c7 100644 --- a/content/options.js +++ b/content/options.js @@ -112,8 +112,8 @@ liberator.Option = function (names, description, type, defaultValue, extraInfo) if (this.setter) { - var tmpValue = newValue; - var newValue = this.setter.call(this, newValue); + let tmpValue = newValue; + newValue = this.setter.call(this, newValue); if (typeof newValue == "undefined") {
titleURL