From 01292af298bfb1e4258d44dfa00b435460e70404 Mon Sep 17 00:00:00 2001 From: Gabe Yuan Date: Wed, 3 Jan 2024 13:10:02 +0800 Subject: [PATCH] feat: move open_tranbox shortcurt to browser commands --- public/manifest.firefox.json | 9 ++++----- public/manifest.json | 9 ++++----- src/config/i18n.js | 4 ++-- src/views/Action/index.js | 8 ++++---- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/public/manifest.firefox.json b/public/manifest.firefox.json index 6f715d0..114a809 100644 --- a/public/manifest.firefox.json +++ b/public/manifest.firefox.json @@ -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__" } }, diff --git a/public/manifest.json b/public/manifest.json index 0e5ba81..13f61db 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -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__" } }, diff --git a/src/config/i18n.js b/src/config/i18n.js index f07073b..4bc4c48 100644 --- a/src/config/i18n.js +++ b/src/config/i18n.js @@ -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: `匹配网址`, diff --git a/src/views/Action/index.js b/src/views/Action/index.js index 6f7c876..38d80a3 100644 --- a/src/views/Action/index.js +++ b/src/views/Action/index.js @@ -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"); },