Add translate no attrb

This commit is contained in:
kwaroran
2024-04-08 05:45:08 +09:00
parent ba5c210463
commit 6f627c9bfe

View File

@@ -319,6 +319,9 @@ export async function translateHTML(html: string, reverse:boolean, charArg:simpl
}
for (const child of Array.from(node.childNodes)) {
if(node.nodeType === Node.ELEMENT_NODE && (node as Element)?.getAttribute('translate') === 'no'){
continue
}
await translateNode(child, node);
}
}