feat: support translate all now

This commit is contained in:
Gabe
2025-10-01 21:18:53 +08:00
parent 3c5ffc045f
commit c993c15c92
8 changed files with 56 additions and 38 deletions

View File

@@ -355,9 +355,9 @@ export const I18N = {
zh_TW: `滾動載入翻譯(建議)`,
},
mk_pageopen: {
zh: `页面打开全部翻译`,
en: `Page Open`,
zh_TW: `頁面開啟全部翻譯`,
zh: `立即全部翻译`,
en: `Translate all now`,
zh_TW: `立即全部翻譯`,
},
mk_mouseover: {
zh: `鼠标悬停翻译`,

View File

@@ -73,7 +73,7 @@ background: linear-gradient(
export const DEFAULT_SELECTOR =
"h1, h2, h3, h4, h5, h6, li, p, dd, blockquote, figcaption, label, legend";
export const DEFAULT_IGNORE_SELECTOR =
"aside, button, footer, form, header, pre, mark, nav";
"aside, button, footer, form, pre, mark, nav";
export const DEFAULT_KEEP_SELECTOR = `a:has(code)`;
export const DEFAULT_RULE = {
pattern: "", // 匹配网址

View File

@@ -149,4 +149,5 @@ export const DEFAULT_SETTING = {
langDetector: OPT_TRANS_MICROSOFT, // 远程语言识别服务
mouseHoverSetting: DEFAULT_MOUSE_HOVER_SETTING, // 鼠标悬停翻译
preInit: true, // 是否预加载脚本
transAllnow: false, // 是否立即全部翻译
};