enable/disable addon by keys

This commit is contained in:
Shin'ya Ueoka 2017-10-21 19:40:22 +09:00
parent 59f7ef205d
commit dc6d93c1da
4 changed files with 27 additions and 0 deletions

View file

@ -4,9 +4,16 @@ import * as scrolls from 'content/scrolls';
import * as navigates from 'content/navigates';
import * as urls from 'content/urls';
import * as consoleFrames from 'content/console-frames';
import * as addonActions from './addon';
const exec = (operation) => {
switch (operation.type) {
case operations.ADDON_ENABLE:
return addonActions.enable();
case operations.ADDON_DISABLE:
return addonActions.disable();
case operations.ADDON_TOGGLE_ENABLED:
return addonActions.toggleEnabled();
case operations.SCROLL_VERTICALLY:
return scrolls.scrollVertically(window, operation.count);
case operations.SCROLL_HORIZONALLY: