feat: move open_tranbox shortcurt to browser commands

This commit is contained in:
Gabe Yuan
2024-01-03 13:10:02 +08:00
parent cff8b2fe39
commit 01292af298
4 changed files with 14 additions and 16 deletions

View File

@@ -35,13 +35,12 @@
"description": "__MSG_open_tranbox__"
},
"toggleStyle": {
"description": "__MSG_toggle_style__",
"global": false
"suggested_key": {
"default": "Alt+C"
},
"description": "__MSG_toggle_style__"
},
"openOptions": {
"suggested_key": {
"default": "Alt+O"
},
"description": "__MSG_open_options__"
}
},

View File

@@ -36,13 +36,12 @@
"description": "__MSG_open_tranbox__"
},
"toggleStyle": {
"description": "__MSG_toggle_style__",
"global": false
"suggested_key": {
"default": "Alt+C"
},
"description": "__MSG_toggle_style__"
},
"openOptions": {
"suggested_key": {
"default": "Alt+O"
},
"description": "__MSG_open_options__"
}
},

View File

@@ -356,8 +356,8 @@ export const I18N = {
en: `Follow the syntax of "CSS"`,
},
setting: {
zh: `设置 (Alt+O)`,
en: `Setting (Alt+O)`,
zh: `设置`,
en: `Setting`,
},
pattern: {
zh: `匹配网址`,

View File

@@ -99,7 +99,7 @@ export default function Action({ translator, fab }) {
contextMenus &&
menuCommandIds.push(
GM.registerMenuCommand(
"Toggle Translate (Alt+q)",
"Toggle Translate (Alt+Q)",
(event) => {
translator.toggle();
sendIframeMsg(MSG_TRANS_TOGGLE);
@@ -108,7 +108,7 @@ export default function Action({ translator, fab }) {
"Q"
),
GM.registerMenuCommand(
"Toggle Style (Alt+c)",
"Toggle Style (Alt+C)",
(event) => {
translator.toggleStyle();
sendIframeMsg(MSG_TRANS_TOGGLE_STYLE);
@@ -117,14 +117,14 @@ export default function Action({ translator, fab }) {
"C"
),
GM.registerMenuCommand(
"Open Menu (Alt+k)",
"Open Menu (Alt+K)",
(event) => {
setShowPopup((pre) => !pre);
},
"K"
),
GM.registerMenuCommand(
"Open Setting (Alt+o)",
"Open Setting",
(event) => {
window.open(process.env.REACT_APP_OPTIONSPAGE, "_blank");
},