Refactor background directories

This commit is contained in:
Shin'ya Ueoka 2018-05-06 11:45:07 +09:00
parent c5c08783d2
commit 98bc2326ee
9 changed files with 19 additions and 21 deletions

View file

@ -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 };