complete histoly simply
This commit is contained in:
parent
49fc34e444
commit
66de4a59d0
2 changed files with 33 additions and 0 deletions
10
src/background/histories.js
Normal file
10
src/background/histories.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
const getCompletions = (keyword) => {
|
||||
return browser.history.search({
|
||||
text: keyword,
|
||||
startTime: '1970-01-01'
|
||||
}).then((items) => {
|
||||
return items.sort((x, y) => x.lastVisitTime < y.lastVisitTime).slice(0, 10);
|
||||
});
|
||||
};
|
||||
|
||||
export { getCompletions };
|
Reference in a new issue