From dc6d93c1da28ed17fe1bc5be07bdfab30a40dd66 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 21 Oct 2017 19:40:22 +0900 Subject: enable/disable addon by keys --- src/content/actions/operation.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/content/actions') diff --git a/src/content/actions/operation.js b/src/content/actions/operation.js index 81bcc2f..897f361 100644 --- a/src/content/actions/operation.js +++ b/src/content/actions/operation.js @@ -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: -- cgit v1.2.3