1/** 2 * Module: hero-time-cta.js 3 * TrÃch nguyên vÄn dòng 603-620 cá»§a pctech-homepage.js gá»c. 4 * Không Äá»i bất kỳ ký tá»± nà o bên trong â chá» cắt file, không sá»a logic. 5'use strict'; 6 7 */ 8 /* ââ Hero CTA theo giá» ââ */ 9 function initHeroTimeCta() { 10 const el = document.getElementById('heroTimeCta'); 11 const headerBtn = document.getElementById('headerCallBtn'); 12 const heroCall = document.getElementById('heroCallBtn'); 13 const hour = new Date().getHours(); 14 const isOpen = hour >= 8 && hour < 21; 15 if (el) { 16 el.innerHTML = isOpen 17 ? 'ð¢ <strong>KTV Äang online</strong> â Gá»i ngay, phản há»i trong và i phút' 18 : 'ð Ngoà i giá» là m viá»c â <a href="#" data-modal-open="modalBooking" style="color:#ffd080">Äặt lá»ch sáng mai</a>'; 19 el.querySelector('[data-modal-open]')?.addEventListener('click', (e) => { e.preventDefault(); openModal('modalBooking'); }); 20 } 21 // Nút menu chÃnh: chữ NGẮN (tránh nút to, xuá»ng dòng); trạng thái online thá» hiá»n bằng chấm xanh + tooltip. 22 const callText = isOpen ? 'Gá»i ngay' : 'Äá» lại tin'; 23 if (headerBtn) { 24 headerBtn.textContent = callText; 25 headerBtn.setAttribute('data-online', isOpen ? '1' : '0'); 26 headerBtn.title = isOpen ? 'KTV Äang online â phản há»i trong và i phút' : 'Ngoà i giá» là m viá»c â Äá» lại tin, chúng tôi gá»i lại sáng mai'; 27 } 28 if (heroCall) heroCall.textContent = isOpen ? 'â Gá»i Ngay' : 'â Äá» lại tin nhắn'; 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.