consome as store/reducers

This commit is contained in:
Shin'ya Ueoka 2017-09-14 22:04:42 +09:00
parent 6127fdc285
commit 83cb277ba2
17 changed files with 171 additions and 236 deletions
src/actions

View file

@ -1,4 +1,5 @@
import operations from '../operations';
import * as consoleActions from './console';
import * as tabs from '../background/tabs';
import * as zooms from '../background/zooms';
@ -20,6 +21,17 @@ export function exec(operation, tab) {
return zooms.zoomOut();
case operations.ZOOM_NEUTRAL:
return zooms.neutral();
case operations.COMMAND_OPEN:
return consoleActions.showCommand('');
case operations.COMMAND_TABS_OPEN:
if (operations.alter) {
// alter url
return consoleActions.showCommand('open ' + tab.url);
} else {
return consoleActions.showCommand('open ');
}
case operations.COMMAND_BUFFER:
return consoleActions.showCommand('buffer ');
default:
return browser.tabs.sendMessage(tab.id, {
type: 'require.content.operation',