Add audio, video tag to combine blacklist
This commit is contained in:
@@ -371,7 +371,7 @@ export async function translateHTML(html: string, reverse:boolean, charArg:simpl
|
|||||||
node instanceof HTMLElement
|
node instanceof HTMLElement
|
||||||
) {
|
) {
|
||||||
const children = Array.from(node.childNodes);
|
const children = Array.from(node.childNodes);
|
||||||
const blacklist = ["img", "iframe", "script", "style", "div", "button"];
|
const blacklist = ["img", "iframe", "script", "style", "div", "button", "audio", "video"];
|
||||||
const hasBlacklistChild = children.some((child) =>
|
const hasBlacklistChild = children.some((child) =>
|
||||||
blacklist.includes(child.nodeName.toLowerCase())
|
blacklist.includes(child.nodeName.toLowerCase())
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user