@ohhwells/bridge 0.1.52-next.137 → 0.1.52-next.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9117,13 +9117,17 @@ function applyLogoImage(url, alt) {
|
|
|
9117
9117
|
img.removeAttribute("sizes");
|
|
9118
9118
|
img.src = url;
|
|
9119
9119
|
img.alt = displayAlt;
|
|
9120
|
-
img.style.display = "";
|
|
9120
|
+
img.style.display = "block";
|
|
9121
9121
|
if (textEl) textEl.style.display = "none";
|
|
9122
9122
|
root.removeAttribute("data-ohw-placeholder");
|
|
9123
9123
|
return;
|
|
9124
9124
|
}
|
|
9125
9125
|
if (img) {
|
|
9126
|
-
img.
|
|
9126
|
+
img.removeAttribute("src");
|
|
9127
|
+
img.removeAttribute("srcset");
|
|
9128
|
+
img.removeAttribute("sizes");
|
|
9129
|
+
img.alt = displayAlt;
|
|
9130
|
+
img.style.display = "none";
|
|
9127
9131
|
}
|
|
9128
9132
|
if (!textEl) {
|
|
9129
9133
|
textEl = document.createElement("span");
|
|
@@ -9154,7 +9158,8 @@ function readLogoIdentityFromDom() {
|
|
|
9154
9158
|
for (const key of LOGO_IMAGE_KEYS) {
|
|
9155
9159
|
const el = document.querySelector(`[data-ohw-key="${key}"]`);
|
|
9156
9160
|
const img = el instanceof HTMLImageElement ? el : el?.querySelector("img");
|
|
9157
|
-
|
|
9161
|
+
const attrSrc = img?.getAttribute("src")?.trim() ?? "";
|
|
9162
|
+
if (attrSrc && !attrSrc.startsWith("data:") && img && img.style.display !== "none") {
|
|
9158
9163
|
imageUrl = img.currentSrc || img.src;
|
|
9159
9164
|
break;
|
|
9160
9165
|
}
|