Fix tab completions
This commit is contained in:
parent
4116d08642
commit
a8ac7415f8
4 changed files with 31 additions and 25 deletions
|
@ -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;
|
||||
});
|
||||
|
|
Reference in a new issue