website: update livestream page (#7422)

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
Evgeny
2026-08-26 18:33:44 +01:00
committed by GitHub
co-authored by Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
parent 10adabf5f7
commit 3923cb0f2a
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -19,6 +19,15 @@ function showLocalTime() {
local.removeAttribute('hidden');
}
function setSignupSource() {
const field = document.querySelector('input[name="SOURCE"]');
if (!field) return;
const inHash = new URLSearchParams(location.hash.replace(/^#\??/, '')).get('utm_source');
const source = inHash ?? new URLSearchParams(location.search).get('utm_source');
if (source && /^[\w.-]{1,40}$/.test(source)) field.value = source;
}
function setupRegisterOverlay() {
const overlay = document.getElementById('register');
const openBtn = document.querySelector('.register-btn');
@@ -67,5 +76,6 @@ function trackNavColor() {
}
showLocalTime();
setSignupSource();
setupRegisterOverlay();
trackNavColor();
+1
View File
@@ -96,6 +96,7 @@ templateEngineOverride: njk
<form action="https://chat.us2.list-manage.com/subscribe/post?u=ddd892b258ae36e5438e6d4e1&amp;id=6f73f92ffa&amp;f_id=006bf8e3f0" method="post" target="_blank">
<input type="email" name="EMAIL" placeholder="Enter your email address" aria-label="Email address" required>
<input type="hidden" name="SOURCE" value="livestream_page">
<span aria-hidden="true" class="bot-field">
<input type="text" name="b_ddd892b258ae36e5438e6d4e1_6f73f92ffa" tabindex="-1" value="">
</span>