From 36b4d25d244c70d38abb8ede2e6f0e3f2ee446ea Mon Sep 17 00:00:00 2001 From: ThomazPom Date: Sun, 15 Sep 2024 23:05:11 +0200 Subject: [PATCH] PreRelease 1.5.59 --- background.js | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/background.js b/background.js index 7824a56..edbe7a6 100644 --- a/background.js +++ b/background.js @@ -201,10 +201,9 @@ window.dark_object = { } let selectorText = image.tagName+`[data-ud-selector='${image.getAttribute("data-ud-selector")}']`; let notableInfos = {}; - for (const attributeName of image.getAttributeNames()) { - let infoValue = image.getAttribute(attributeName); - if (infoValue.length > 0 && !(/[.\/]/i).test(infoValue) && !(["src","data", "data-ud-selector"]).includes(attributeName)) { - notableInfos[attributeName] = infoValue; + for (const attribute of image.attributes) { + if (attribute.value.length > 0 && !(/[.\/]/i).test(attribute.value) && !(["src","data", "data-ud-selector"]).includes(attribute.name)) { + notableInfos[attribute.name] = attribute.value; } } if (imageTrueSrc.includes(uDark.imageSrcInfoMarker)) { @@ -799,8 +798,15 @@ window.dark_object = { restoreTemplateElements: function(aDocument) { // Restore