parent
c5c08783d2
commit
98bc2326ee
9 changed files with 19 additions and 21 deletions
@ -0,0 +1,10 @@ |
|||||||
|
const getCompletions = (keyword) => { |
||||||
|
return browser.tabs.query({ currentWindow: true }).then((tabs) => { |
||||||
|
let matched = tabs.filter((t) => { |
||||||
|
return t.url.includes(keyword) || t.title && t.title.includes(keyword); |
||||||
|
}); |
||||||
|
return matched; |
||||||
|
}); |
||||||
|
}; |
||||||
|
|
||||||
|
export { getCompletions }; |
@ -1,3 +0,0 @@ |
|||||||
import complete from './complete'; |
|
||||||
|
|
||||||
export { complete }; |
|
Reference in new issue