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.js20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/background/index.js b/src/background/index.js
index 61d4895..a80d1ea 100644
--- a/src/background/index.js
+++ b/src/background/index.js
@@ -2,6 +2,7 @@ import * as actions from '../shared/actions';
import * as tabs from './tabs';
import * as zooms from './zooms';
import KeyQueue from './key-queue';
+import backgroundReducers from '../reducers/background';
const queue = new KeyQueue();
@@ -81,22 +82,11 @@ browser.runtime.onMessage.addListener((request, sender) => {
return keyPressHandle(request, sender);
case 'event.cmd.enter':
return cmdEnterHandle(request, sender);
- 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,
- icon: tab.favIconUrl
- }
- });
- return {
- name: "Buffers",
- items: items
- };
- });
default:
return browser.tabs.sendMessage(sender.tab.id, request);
}
});
+
+browser.runtime.onMessage.addListener((action, sender) => {
+ return backgroundReducers(undefined, action, sender.tab.id);
+});