document.addEventListener('DOMContentLoaded', () => { const checkAndFix = () => { const b = document.body, h = document.documentElement; const bStyle = window.getComputedStyle(b); const hStyle = window.getComputedStyle(h); console.log('🧩 Scroll styles:', { bodyOverflow: bStyle.overflow, htmlOverflow: hStyle.overflow, bodyClass: b.className, bodyStyle: b.getAttribute('style') }); // พยายามปลดล็อก scroll b.style.overflow = 'auto'; h.style.overflow = 'auto'; b.classList.remove('ux-overflow-hidden', 'no-scroll', 'modal-open'); b.removeAttribute('style'); h.removeAttribute('style'); }; // ตรวจทุก 1 วินาที 5 ครั้งเผื่อมี script เข้ามาหลังโหลด for (let i = 0; i < 5; i++) { setTimeout(checkAndFix, i * 1000); } });