diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-07-28 20:05:06 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-28 20:05:06 +0900 |
commit | ed2bd7d75ee1e7aa1db7d03c3f908c740ded1983 (patch) | |
tree | 6ac3f5ac5126e1a07c958549c782aedd586c6534 /src/background/shared/completions/bookmarks.js | |
parent | 84a9655bb39e5902b417e124a0eb23d80808a6a7 (diff) | |
parent | 4bd2084ba7b23327c26a2d8b24dc4169c14bfa17 (diff) |
Merge pull request #440 from ueokande/background-clean-architecture
Background clean architecture
Diffstat (limited to 'src/background/shared/completions/bookmarks.js')
-rw-r--r-- | src/background/shared/completions/bookmarks.js | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/background/shared/completions/bookmarks.js b/src/background/shared/completions/bookmarks.js deleted file mode 100644 index bd753af..0000000 --- a/src/background/shared/completions/bookmarks.js +++ /dev/null @@ -1,14 +0,0 @@ -const getCompletions = async(keywords) => { - let items = await browser.bookmarks.search({ query: keywords }); - return items.filter((item) => { - let url = undefined; - try { - url = new URL(item.url); - } catch (e) { - return false; - } - return item.type === 'bookmark' && url.protocol !== 'place:'; - }).slice(0, 10); -}; - -export { getCompletions }; |