X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=common%2Fmodules%2Fbookmarkcache.jsm;h=031618941e915c2e2d6121f7cad5344085be185a;hb=354a049cce8415487552ce405cce167b7071fe1f;hp=2647848d2f97209cd9c27bf2c5d8fa255a2883b4;hpb=5ebd29f56d17f62011cdd596b1d351947ee534ff;p=dactyl.git diff --git a/common/modules/bookmarkcache.jsm b/common/modules/bookmarkcache.jsm index 2647848..0316189 100644 --- a/common/modules/bookmarkcache.jsm +++ b/common/modules/bookmarkcache.jsm @@ -1,14 +1,13 @@ -// Copyright ©2008-2010 Kris Maglione +// Copyright ©2008-2013 Kris Maglione // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. -/* use strict */ +"use strict"; -Components.utils.import("resource://dactyl/bootstrap.jsm"); defineModule("bookmarkcache", { exports: ["Bookmark", "BookmarkCache", "Keyword", "bookmarkcache"], require: ["services", "util"] -}, this); +}); this.lazyRequire("storage", ["storage"]); @@ -28,7 +27,7 @@ update(Bookmark.prototype, { get extra() [ ["keyword", this.keyword, "Keyword"], ["tags", this.tags.join(", "), "Tag"] - ].filter(function (item) item[1]), + ].filter(item => item[1]), get uri() newURI(this.url), set uri(uri) { @@ -91,7 +90,7 @@ var BookmarkCache = Module("BookmarkCache", XPCOM(Ci.nsINavBookmarkObserver), { keywords: Class.Memoize(function () array.toObject([[b.keyword, b] for (b in this) if (b.keyword)])), rootFolders: ["toolbarFolder", "bookmarksMenuFolder", "unfiledBookmarksFolder"] - .map(function (s) services.bookmarks[s]), + .map(s => services.bookmarks[s]), _deleteBookmark: function deleteBookmark(id) { let result = this.bookmarks[id] || null; @@ -263,4 +262,4 @@ var BookmarkCache = Module("BookmarkCache", XPCOM(Ci.nsINavBookmarkObserver), { endModule(); -// vim: set fdm=marker sw=4 sts=4 et ft=javascript: +// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: