From ccdb0a2428bbdc56e8288442f844a4bb3b8f9a11 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 28 Jul 2018 10:51:52 +0900 Subject: Clean old codes --- src/background/shared/completions/bookmarks.js | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 src/background/shared/completions/bookmarks.js (limited to 'src/background/shared/completions/bookmarks.js') 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 }; -- cgit v1.2.3