diff options
author | Doug Kearns <dougkearns@gmail.com> | 2015-07-23 01:15:41 +1000 |
---|---|---|
committer | Doug Kearns <dougkearns@gmail.com> | 2015-07-23 01:15:41 +1000 |
commit | 779752d776d5f08b8da5b69d105ccb4920f90689 (patch) | |
tree | 38f50ffcca3cc65925e907b3a0681ba5557620c0 /common/content/history.js | |
parent | 85eede1ee2d6349ce2bd4adafe35eb8bdb27b1e1 (diff) | |
download | pentadactyl-779752d776d5f08b8da5b69d105ccb4920f90689.tar.gz |
Replace expression closures (command/option/mapping definitions).
Expression closures are to be axed. See https://bugzil.la/1083458.
Diffstat (limited to 'common/content/history.js')
-rw-r--r-- | common/content/history.js | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/common/content/history.js b/common/content/history.js index c3cdfdf5..70fe1af2 100644 --- a/common/content/history.js +++ b/common/content/history.js @@ -200,8 +200,7 @@ var History = Module("history", { history.stepTo(-Math.max(args.count, 1)); } return null; - }, - { + }, { argCount: "?", bang: true, completer: function completer(context) { @@ -211,9 +210,13 @@ var History = Module("history", { context.compare = CompletionContext.Sort.unsorted; context.filters = [CompletionContext.Filter.textDescription]; context.completions = sh.slice(0, sh.index).reverse(); - context.keys = { text: function (item) (sh.index - item.index) + ": " + item.URI.spec, - description: "title", - icon: "icon" }; + context.keys = { + text: function (item) { + return (sh.index - item.index) + ": " + item.URI.spec; + }, + description: "title", + icon: "icon" + }; }, count: true, literal: 0, @@ -242,8 +245,7 @@ var History = Module("history", { history.stepTo(Math.max(args.count, 1)); } return null; - }, - { + }, { argCount: "?", bang: true, completer: function completer(context) { @@ -253,9 +255,13 @@ var History = Module("history", { context.compare = CompletionContext.Sort.unsorted; context.filters = [CompletionContext.Filter.textDescription]; context.completions = sh.slice(sh.index + 1); - context.keys = { text: function (item) (item.index - sh.index) + ": " + item.URI.spec, - description: "title", - icon: "icon" }; + context.keys = { + text: function (item) { + return (item.index - sh.index) + ": " + item.URI.spec; + }, + description: "title", + icon: "icon" + }; }, count: true, literal: 0, @@ -264,9 +270,13 @@ var History = Module("history", { commands.add(["hist[ory]", "hs"], "Show recently visited URLs", - function (args) { history.list(args.join(" "), args.bang, args["-max"], args["-sort"]); }, { + function (args) { + history.list(args.join(" "), args.bang, args["-max"], args["-sort"]); + }, { bang: true, - completer: function (context, args) completion.history(context, args["-max"], args["-sort"]), + completer: function (context, args) { + completion.history(context, args["-max"], args["-sort"]); + }, options: [ { names: ["-max", "-m"], |