add context menus: open tranbox
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
MSG_TRANS_TOGGLE,
|
||||
MSG_TRANS_TOGGLE_STYLE,
|
||||
MSG_TRANSLATE_SELECTED,
|
||||
MSG_OPEN_TRANBOX,
|
||||
MSG_TRANS_GETRULE,
|
||||
MSG_TRANS_PUTRULE,
|
||||
} from "./config";
|
||||
@@ -39,6 +40,9 @@ function runtimeListener(translator) {
|
||||
case MSG_TRANSLATE_SELECTED:
|
||||
window.dispatchEvent(new CustomEvent(MSG_TRANSLATE_SELECTED));
|
||||
break;
|
||||
case MSG_OPEN_TRANBOX:
|
||||
window.dispatchEvent(new CustomEvent(MSG_OPEN_TRANBOX));
|
||||
break;
|
||||
default:
|
||||
return { error: `message action is unavailable: ${action}` };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user