aboutsummaryrefslogtreecommitdiff
path: root/src/background/shared/completions/tabs.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/shared/completions/tabs.js')
-rw-r--r--src/background/shared/completions/tabs.js4
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;
});