1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-29 06:32:26 +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

@@ -94,9 +94,12 @@ var BookmarkCache = Module("BookmarkCache", XPCOM(Ci.nsINavBookmarkObserver), {
bookmarks: Class.Memoize(function () { return this.load(); }),
keywords: Class.Memoize(function () {
return Ary.toObject([[b.keyword, b]
for (b of this)
if (b.keyword)]);
let res = {};
for (let bookmark of this)
if (bookmark.keyword)
res[bookmark.keyword] = res;
return res;
}),
rootFolders: ["toolbarFolder", "bookmarksMenuFolder", "unfiledBookmarksFolder"]