[wip] remove STATE_UPDATE
This commit is contained in:
parent
10ad62e606
commit
4cb17031d1
6 changed files with 31 additions and 32 deletions
|
@ -55,17 +55,12 @@ const execOperation = (operation) => {
|
|||
}
|
||||
};
|
||||
|
||||
const update = (state) => {
|
||||
if (!state.console.commandShown) {
|
||||
window.focus();
|
||||
consoleFrames.blur(window.document);
|
||||
}
|
||||
};
|
||||
|
||||
browser.runtime.onMessage.addListener((action) => {
|
||||
switch (action.type) {
|
||||
case messages.STATE_UPDATE:
|
||||
return update(action.state);
|
||||
case messages.CONSOLE_HIDE:
|
||||
window.focus();
|
||||
consoleFrames.blur(window.document);
|
||||
return Promise.resolve();
|
||||
case messages.CONTENT_OPERATION:
|
||||
execOperation(action.operation);
|
||||
return Promise.resolve();
|
||||
|
|
Reference in a new issue