fix: ignore script ellement

This commit is contained in:
Gabe
2025-10-27 20:00:05 +08:00
parent 3d7e03ddaf
commit fbd4a31a9c

View File

@@ -1298,7 +1298,7 @@ export class Translator {
(this.#rule.hasRichText === "true" && (this.#rule.hasRichText === "true" &&
Translator.TAGS.REPLACE.has(node.tagName)) || Translator.TAGS.REPLACE.has(node.tagName)) ||
node.matches(this.#rule.keepSelector) || node.matches(this.#rule.keepSelector) ||
node.matches(this.#ignoreSelector) || // node.matches(this.#ignoreSelector) ||
!node.textContent.trim() !node.textContent.trim()
) { ) {
if (node.tagName === "IMG" || node.tagName === "SVG") { if (node.tagName === "IMG" || node.tagName === "SVG") {