1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 03:47:58 +01:00

ES6-ify some things. Still a long way to go...

This commit is contained in:
Kris Maglione
2015-12-20 02:02:54 -08:00
parent 65725c9516
commit 27cdeb1885
28 changed files with 411 additions and 303 deletions

View File

@@ -1,6 +1,6 @@
// Copyright (c) 2006-2008 by Martin Stubenschrott <stubenschrott@vimperator.org>
// Copyright (c) 2007-2011 by Doug Kearns <dougkearns@gmail.com>
// Copyright (c) 2008-2014 Kris Maglione <maglione.k@gmail.com>
// Copyright (c) 2008-2015 Kris Maglione <maglione.k@gmail.com>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
@@ -290,7 +290,7 @@ var History = Module("history", {
description: "The sort order of the results",
completer: function (context) {
context.compare = CompletionContext.Sort.unsorted;
return Ary.flatten([
return [
"annotation",
"date",
"date added",
@@ -300,10 +300,10 @@ var History = Module("history", {
"title",
"uri",
"visitcount"
].map(order => [
["+" + order.replace(" ", ""), /*L*/"Sort by " + order + " ascending"],
["-" + order.replace(" ", ""), /*L*/"Sort by " + order + " descending"]
]));
].flatMap(order => [
["+" + order.replace(" ", ""), /*L*/"Sort by " + order + " ascending"],
["-" + order.replace(" ", ""), /*L*/"Sort by " + order + " descending"]
]);
}
}
],