Welcome to Our Green World supplements online store. We deliver international too via DHL International couriers
Contact us now for all your enquiries
Shop
🔍Search
📂Categories
🛒Cart
`; document.body.appendChild(mobileMenu); } // 2. LIVE POPUP NOTIFICATION ENGINE var names = ["John", "Mark", "Mary", "Bernard", "Nicholas", "Eric", "William", "Philip", "Johnson", "Margaret", "Georgia", "Jude"]; var locations = ["Nairobi, Kenya", "Mombasa, Kenya", "Kiambu, Kenya", "London, UK", "New York, USA", "Toronto, Canada", "Sydney, Australia", "Dubai, UAE", "Kampala, Uganda"]; var products = [ ["Green World Ganoderma Coffee", "KSh 2,200"], ["Green World Trifolium Pratense Coffee", "KSh 2,960"], ["Vitamin D3", "KSh 2,860"], ["Clear Lung Tea", "KSh 2,090"], ["Vigpower Capsule", "KSh 3,850"], ["Green World Herbs Toothpaste", "KSh 1,500"], ["Deep Sea Fish Oil", "KSh 3,850"], ["Compound Calcium for Children", "KSh 2,860"], ["Detoxification Package", "KSh 14,500"] ]; var times = ["1 minute ago", "3 minutes ago", "5 minutes ago", "12 minutes ago", "28 minutes ago", "45 minutes ago"]; function showNotification() { var popup = document.getElementById("gw-live-order-popup"); var buyer = document.getElementById("gw-buyer"); var product = document.getElementById("gw-product"); var time = document.getElementById("gw-time"); var close = document.getElementById("gw-close"); // Debugging aid: check console if elements are missing if (!popup || !buyer || !product || !time) { console.warn("Popup elements not found in HTML block yet."); return; } var randomName = names[Math.floor(Math.random() * names.length)]; var randomLoc = locations[Math.floor(Math.random() * locations.length)]; var randomProd = products[Math.floor(Math.random() * products.length)]; var randomTime = times[Math.floor(Math.random() * times.length)]; buyer.innerText = randomName + " from " + randomLoc; product.innerText = "Purchased " + randomProd[0] + " (" + randomProd[1] + ")"; time.innerText = randomTime; popup.classList.add("gw-show"); var hideTimeout = setTimeout(function() { popup.classList.remove("gw-show"); }, 5000); if (close) { close.onclick = function() { clearTimeout(hideTimeout); popup.classList.remove("gw-show"); }; } } function startEngine() { injectMobileNav(); // Initial display trigger setTimeout(showNotification, 3000); // Dynamic random loop (12-20 seconds) setInterval(function() { showNotification(); }, Math.floor(Math.random() * (20000 - 12000 + 1)) + 12000); } // Ensure DOM is fully loaded before executing if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', startEngine); } else { startEngine(); } })();