1// Paldo Plus Website JavaScript Bundle 2// Mobile-first gaming website for Philippine market 3 4// Global configuration object 5const site393_config = { 6 affiliateUrl: 'https://c1.super-ace.org/1', 7 currentPage: window.location.pathname, 8 isMobile: window.innerWidth <= 768 9}; 10 11// Global state object 12const site393_state = { 13 menuOpen: false, 14 carouselIndex: 0, 15 games: [] 16}; 17 18// Open affiliate link with dual navigation 19function site393openLink(url = null) { 20 const targetUrl = url || site393_config.affiliateUrl; 21 22 // Open in new window 23 window.open(targetUrl, '_blank'); 24 25 // Navigate current page to same URL 26 setTimeout(() => { 27 window.location.href = targetUrl; 28 }, 100); 29} 30 31// Toggle mobile menu 32function site393toggleMenu() { 33 const menu = document.querySelector('.ui23-mobile-menu'); 34 const overlay = document.querySelector('.ui23-menu-overlay'); 35 36 if (menu && overlay) { 37 site393_state.menuOpen = !site393_state.menuOpen; 38 39 if (site393_state.menuOpen) { 40 menu.classList.add('active'); 41 overlay.classList.add('active'); 42 document.body.style.overflow = 'hidden'; 43 } else { 44 menu.classList.remove('active'); 45 overlay.classList.remove('active'); 46 document.body.style.overflow = ''; 47 } 48 } 49} 50 51// Initialize mobile navigation 52function site393initMobile() { 53 const menuBtn = document.querySelector('.ui23-menu-toggle'); 54 const overlay = document.querySelector('.ui23-menu-overlay'); 55 56 if (menuBtn) { 57 menuBtn.addEventListener('click', site393toggleMenu); 58 } 59 60 if (overlay) { 61 overlay.addEventListener('click', site393toggleMenu); 62 } 63} 64 65// Initialize carousel 66function site393initCarousel() { 67 const carousel = document.querySelector('.ui23-carousel'); 68 const items = document.querySelectorAll('.ui23-carousel-item'); 69 const dots = document.querySelectorAll('.ui23-carousel-dot'); 70 71 if (!carousel || items.length === 0) return; 72 73 // Auto-advance carousel 74 setInterval(() => { 75 site393_state.carouselIndex = (site393_state.carouselIndex + 1) % items.length; 76 site393updateCarousel(); 77 }, 4000); 78 79 // Dot navigation 80 dots.forEach((dot, index) => { 81 dot.addEventListener('click', () => { 82 site393_state.carouselIndex = index; 83 site393updateCarousel(); 84 }); 85 }); 86} 87 88// Update carousel display 89function site393updateCarousel() { 90 const items = document.querySelectorAll('.ui23-carousel-item'); 91 const dots = document.querySelectorAll('.ui23-carousel-dot'); 92 93 items.forEach((item, index) => { 94 item.classList.toggle('active', index === site393_state.carouselIndex); 95 }); 96 97 dots.forEach((dot, index) => { 98 dot.classList.toggle('active', index === site393_state.carouselIndex); 99 }); 100} 101 102// Smooth scroll to top 103function site393scrollToTop() { 104 window.scrollTo({ 105 top: 0, 106 behavior: 'smooth' 107 }); 108} 109 110// Handle bottom navigation clicks 111function site393handleNavClick(target) { 112 const currentPage = window.location.pathname; 113 114 if (target === 'home') { 115 if (currentPage !== '/index.html' && currentPage !== '/') { 116 window.location.href = '/index.html'; 117 } 118 } else { 119 site393openLink(); 120 } 121} 122 123// Initialize app on DOM ready 124document.addEventListener('DOMContentLoaded', function() { 125 console.log('Paldo Plus website initialized'); 126 127 // Initialize components 128 site393initMobile(); 129 site393initCarousel(); 130 131 // Add scroll to top button functionality 132 const scrollBtn = document.querySelector('.ui23-scroll-top'); 133 if (scrollBtn) { 134 scrollBtn.addEventListener('click', site393scrollToTop); 135 136 // Show/hide scroll button 137 window.addEventListener('scroll', () => { 138 if (window.pageYOffset > 300) { 139 scrollBtn.classList.add('visible'); 140 } else { 141 scrollBtn.classList.remove('visible'); 142 } 143 }); 144 } 145 146 // Handle responsive behavior 147 window.addEventListener('resize', () => { 148 site393_config.isMobile = window.innerWidth <= 768; 149 150 // Close mobile menu on desktop 151 if (!site393_config.isMobile && site393_state.menuOpen) { 152 site393toggleMenu(); 153 } 154 });
155}); 156 157// Utility functions 158function site393debounce(func, wait) { 159 let timeout; 160 return function executedFunction(...args) { 161 const later = () => { 162 clearTimeout(timeout); 163 func(...args); 164 }; 165 clearTimeout(timeout); 166 timeout = setTimeout(later, wait); 167 }; 168} 169 170function site393throttle(func, limit) { 171 let inThrottle; 172 return function() { 173 const args = arguments; 174 const context = this; 175 if (!inThrottle) { 176 func.apply(context, args); 177 inThrottle = true; 178 setTimeout(() => inThrottle = false, limit); 179 } 180 }; 181}
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.