Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2022-01-22 23:28:06 +01:00 committed by GitHub
parent b338a723ed
commit 116cd9147b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2577,8 +2577,8 @@ module.exports = (_ => {
else if (node.nodeType == Node.TEXT_NODE) return node.nodeValue;
let attributes = {}, importantStyles = [];
if (typeof ref == "function") attributes.ref = ref;
for (let attr of node.attributes) attributes[attr.name] = attr.value;
if (node.attributes.style) attributes.style = BDFDB.ObjectUtils.filter(node.style, n => node.style[n] && isNaN(parseInt(n)), true);
if (node.attributes) for (let attr of node.attributes) attributes[attr.name] = attr.value;
if (node.attributes && node.attributes.style) attributes.style = BDFDB.ObjectUtils.filter(node.style, n => node.style[n] && isNaN(parseInt(n)), true);
attributes.children = [];
if (node.style && node.style.cssText) for (let propStr of node.style.cssText.split(";")) if (propStr.endsWith("!important")) {
let key = propStr.split(":")[0];