parent
bf7c125fb2
commit
890d93fe77
3 changed files with 47 additions and 15 deletions
@ -0,0 +1,11 @@ |
||||
export default class CompletionsRepository { |
||||
async queryTabs(keywords, excludePinned) { |
||||
let tabs = await browser.tabs.query({ currentWindow: true }); |
||||
return tabs.filter((t) => { |
||||
return t.url.toLowerCase().includes(keywords.toLowerCase()) || |
||||
t.title && t.title.toLowerCase().includes(keywords.toLowerCase()); |
||||
}).filter((t) => { |
||||
return !(excludePinned && t.pinned); |
||||
}); |
||||
} |
||||
} |
Reference in new issue