new bot background video
This commit is contained in:
1 parent
6b52f9ea14
commit
b7f1f00f65
4 files changed
+9
-3
No files matched your search
+4
-2
@@ -4,6 +4,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
const mainVideo = document.getElementById('background-video');
|
||||
const calVideo = document.getElementById('calendar-background-video');
|
||||
const bucketlistVideo = document.getElementById('bucketlist-background-video');
|
||||
const botVideo = document.getElementById('yuukabot-background-video');
|
||||
|
||||
// ── Map URL path → tab id ──────────────────────────────
|
||||
function pathToTab(path) {
|
||||
@@ -24,12 +25,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
// map tab id → its dedicated video element (null = use main)
|
||||
const tabVideos = {
|
||||
calendar: calVideo,
|
||||
bucketlist: bucketlistVideo
|
||||
bucketlist: bucketlistVideo,
|
||||
yuukabot: botVideo
|
||||
};
|
||||
|
||||
function setBgForTab(tabId) {
|
||||
// Hide + pause ALL videos first
|
||||
[mainVideo, calVideo, bucketlistVideo].forEach(v => {
|
||||
[mainVideo, calVideo, bucketlistVideo, botVideo].forEach(v => {
|
||||
if (v) { v.style.display = 'none'; v.pause(); }
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user