fix: rules

This commit is contained in:
Gabe
2025-10-10 15:05:47 +08:00
parent e593221e02
commit 3844d2eb75
6 changed files with 31 additions and 7 deletions

View File

@@ -960,6 +960,7 @@ export class Translator {
transOnly,
selectStyle,
parentStyle,
grandStyle,
// detectRemote,
// toLang,
// skipLangs = [],
@@ -1046,6 +1047,9 @@ export class Translator {
if (parentStyle && parentNode && parentNode.style) {
parentNode.style.cssText += parentStyle;
}
if (grandStyle && parentNode && parentNode.parentElement) {
parentNode.parentElement.style.cssText += grandStyle;
}
// 翻译完成钩子函数
if (transEndHook?.trim()) {