aboutsummaryrefslogtreecommitdiff
path: root/src/background/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/index.js')
-rw-r--r--src/background/index.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/background/index.js b/src/background/index.js
index 93d0e74..4a5e6d6 100644
--- a/src/background/index.js
+++ b/src/background/index.js
@@ -84,8 +84,20 @@ browser.runtime.onMessage.addListener((request, sender) => {
return keyPressHandle(request, sender);
case 'event.cmd.enter':
return cmdEnterHandle(request, sender);
- case 'event.cmd.suggest':
- // TODO make suggestion and return
+ case 'event.cmd.tabs.completion':
+ return tabs.getCompletions(request.text).then((tabs) => {
+ let items = tabs.map((tab) => {
+ return {
+ caption: tab.title,
+ content: tab.title,
+ url: tab.url
+ }
+ });
+ return {
+ name: "Buffers",
+ items: items
+ };
+ });
break;
}
return Promise.resolve();