diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-07-28 10:51:52 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-07-28 14:20:29 +0900 |
commit | ccdb0a2428bbdc56e8288442f844a4bb3b8f9a11 (patch) | |
tree | c1d653b3792917473bace600d12a071b35f6168c /src/background/shared/completions/bookmarks.js | |
parent | 66c23423f931bb66c59cd29cf9279a5de5d56535 (diff) |
Clean old codes
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 }; |