PageSourceSearch

https://www.bkkadsignexpo.com/js/custom.js

js bkkadsignexpo.com collected 2026-09-26 07:52:57 UTC 1,590 bytes, 30 lines download raw bytes

1
2document.addEventListener('DOMContentLoaded', function() {
3    const section = document.querySelector('[data-plugin-video-background]');
4    const loader = document.getElementById('videoLoader');
5
6    if (section && loader) {
7        // ใช้ MutationObserver หรือตรวจจับการสร้างแท็ก <video> ที่ถูกดึงเข้ามาด้วยสคริปต์
8        const checkVideo = setInterval(function() {
9            const video = section.querySelector('video');
10            if (video) {
11                clearInterval(checkVideo);
12                
13                // ตรวจว่าวิดีโอกำลังเล่นอยู่หรือไม่
14                if (!video.paused && video.readyState >= 3) {
15                    loader.classList.add('loaded');
16                } else {
17                    // หากยังไม่เล่น ให้ซ่อน Spinner เมื่อวิดีโอเล่น (playing)
18                    video.addEventListener('playing', function() {
19                        loader.classList.add('loaded');
20                    });
21                    
22                    // สำรองกรณี Event ไม่ทำงาน หากวิดีโอโหลดนานเกิน 3 วินาทีให้ซ่อน Spinner ทันที
23                    setTimeout(function() {
24                        loader.classList.add('loaded');
25                    }, 3000);
26                }
27            }
28        }, 300);
29    }
30});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.