From e7c71ea96ff3210491ff79a961eec4a004909789 Mon Sep 17 00:00:00 2001
From: "Evgeny @ SimpleX Chat"
<259188159+evgeny-simplex@users.noreply.github.com>
Date: Wed, 3 Jun 2026 07:34:22 +0000
Subject: [PATCH] fix svg
---
website/src/js/channel-preview.jsc | 30 +++++++++++++++++++-----------
1 file changed, 19 insertions(+), 11 deletions(-)
diff --git a/website/src/js/channel-preview.jsc b/website/src/js/channel-preview.jsc
index 5fa92eedb0..be7b62ba14 100644
--- a/website/src/js/channel-preview.jsc
+++ b/website/src/js/channel-preview.jsc
@@ -718,16 +718,21 @@ function tailSvg() {
return '';
}
-function simplexLogoSvg() {
- var darkBg = '';
+ el.appendChild(document.importNode(_svgParser.parseFromString(darkSvg, 'image/svg+xml').documentElement, true));
+ el.appendChild(document.importNode(_svgParser.parseFromString(lightSvg, 'image/svg+xml').documentElement, true));
}
const FILE_ICON_SVG = ``;
@@ -900,7 +905,8 @@ function renderHeader(channel, channelLink, subscriberCount) {
if (channelLink) {
const btn = document.createElement('a');
btn.className = 'simplex-preview-join-btn';
- btn.innerHTML = 'Join' + simplexLogoSvg();
+ btn.textContent = 'Join';
+ appendSimplexLogo(btn);
btn.href = channelLink;
header.appendChild(btn);
}
@@ -944,7 +950,8 @@ function renderInfoContent(container, data, channelLink, subscriberCount, showAp
openBtn.style.display = 'flex';
openBtn.style.width = 'fit-content';
openBtn.style.margin = '16px auto 0';
- openBtn.innerHTML = 'Join in SimpleX Chat' + simplexLogoSvg();
+ openBtn.textContent = 'Join in SimpleX Chat';
+ appendSimplexLogo(openBtn);
openBtn.href = channelLink;
container.appendChild(openBtn);
}
@@ -1089,7 +1096,8 @@ function renderMobileConversion(container, channelLink, showAppBadges) {
const openBtn = document.createElement('a');
openBtn.className = 'simplex-preview-open-btn';
- openBtn.innerHTML = 'Join in SimpleX Chat' + simplexLogoSvg();
+ openBtn.textContent = 'Join in SimpleX Chat';
+ appendSimplexLogo(openBtn);
openBtn.href = channelLink;
container.appendChild(openBtn);
}