Add "button" to the combine translation blacklist

This commit is contained in:
sub-hub
2024-06-12 23:42:39 +09:00
parent 5f6466b70c
commit e59f8f1fa4

View File

@@ -371,7 +371,7 @@ export async function translateHTML(html: string, reverse:boolean, charArg:simpl
node instanceof HTMLElement
) {
const children = Array.from(node.childNodes);
const blacklist = ["img", "iframe", "script", "style", "div"];
const blacklist = ["img", "iframe", "script", "style", "div", "button"];
const hasBlacklistChild = children.some((child) =>
blacklist.includes(child.nodeName.toLowerCase())
);