Add post-video redirect to YouTube URL from env config.

After the intro finishes, users are redirected to POST_VIDEO_REDIRECT_URL loaded via generated config.js for dev, Docker, and Dokploy deployments.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-26 15:36:38 +02:00
parent d17987efed
commit 833e248518
10 changed files with 70 additions and 3 deletions
+6
View File
@@ -154,8 +154,11 @@
</div>
</div>
<script src="/config.js"></script>
<script>
const config = window.SLAVIC_PULSE_CONFIG || {};
const VIDEO_ID = 'kujXXtoHUbc';
const POST_VIDEO_REDIRECT_URL = config.postVideoRedirectUrl || '';
const BG_IMAGE = '/assets/imgs/www-bg-slavic-pulse-com-001.jpg';
let player;
@@ -239,6 +242,9 @@
function onPlayerStateChange(event) {
if (event.data === YT.PlayerState.ENDED) {
stageVideo.classList.remove('active');
if (POST_VIDEO_REDIRECT_URL) {
window.location.href = POST_VIDEO_REDIRECT_URL;
}
}
}