diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-05-12 16:28:43 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-12 16:28:43 +0900 |
commit | c6c885345e212bedc2723e9105488d3e5fe9f8be (patch) | |
tree | beaca04a06f6f02f9222af0e73b3768f994f6acd /src/background/shared/completions/tabs.js | |
parent | b0dddc9fa7765dc252fd11fc7d0fe52820655fd5 (diff) | |
parent | a8ac7415f8b5e9e9dc36318a04b7da7775796a88 (diff) |
Merge pull request #391 from ueokande/delete-tabs
Delete tabs
Diffstat (limited to 'src/background/shared/completions/tabs.js')
-rw-r--r-- | src/background/shared/completions/tabs.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/background/shared/completions/tabs.js b/src/background/shared/completions/tabs.js index 5edddca..8c0f1f9 100644 --- a/src/background/shared/completions/tabs.js +++ b/src/background/shared/completions/tabs.js @@ -1,7 +1,9 @@ -const getCompletions = (keyword) => { +const getCompletions = (keyword, excludePinned) => { return browser.tabs.query({ currentWindow: true }).then((tabs) => { let matched = tabs.filter((t) => { return t.url.includes(keyword) || t.title && t.title.includes(keyword); + }).filter((t) => { + return !(excludePinned && t.pinned); }); return matched; }); |