/* Add custom Js code below */ salla.onReady(() => { let attempts = 0; const maxTime = 5000; // 5 seconds const intervalTime = 300; // check every 300ms const checkInterval = setInterval(() => { attempts += intervalTime; const target = document.querySelector('.store-contact-info .footer-list'); // إذا وجدنا العنصر if (target) { const contactEl = document.createElement('salla-contacts'); target.insertAdjacentElement('afterend', contactEl); clearInterval(checkInterval); console.log("Element found — script executed"); return; } // إذا انتهت الخمسة ثواني بدون نتيجة if (attempts >= maxTime) { clearInterval(checkInterval); console.warn("Timeout: .footer-list not found after 5s"); } }, intervalTime); });