document.addEventListener("DOMContentLoaded", function() { // ابحث عن عنصر الحقوق الموجود حالياً const copyrightEl = document.querySelector(".copyrights p"); if (copyrightEl) { // غيّر النص والرابط عبر الـ DOM copyrightEl.innerHTML = ` برمجة وتطوير | 2025 AL Zaiem 💻 `; } }); /* Add custom Js styles below */ /* Add custom Js styles below */ /* Add custom Js code below */ (function() { let checkAttempts = 0; const maxAttempts = 20; // سيحاول لمدة 10 ثوانٍ const moveSocialToContact = setInterval(function() { checkAttempts++; // 1. استهداف مكون الأيقونات const socialComponent = document.querySelector('salla-social'); // 2. البحث عن عنوان "تواصل معنا" (نبحث في كل العناوين) const allTitles = document.querySelectorAll('h1, h2, h3, h4, h5, h6, .footer-title, .footer-section-title'); let contactHeader = Array.from(allTitles).find(el => el.textContent.includes('تواصل معنا')); if (socialComponent && contactHeader) { // الوصول للحاوية الأب لعنوان تواصل معنا const parentSection = contactHeader.parentElement; // نقل الأيقونات parentSection.appendChild(socialComponent); // تنسيق الأيقونات لتظهر بشكل صحيح socialComponent.style.display = 'flex'; socialComponent.style.marginTop = '15px'; socialComponent.style.justifyContent = 'flex-start'; console.log("تم نقل الأيقونات بنجاح"); clearInterval(moveSocialToContact); } if (checkAttempts >= maxAttempts) { clearInterval(moveSocialToContact); console.log("لم يتم العثور على العناصر المطلوبة"); } }, 500); })(); const enhanceCustomerService = () => { // استهداف جميع عناصر خدمة العملاء في سلة const contactItems = document.querySelectorAll('.s-contacts-item'); contactItems.forEach(item => { // التأكد من استهداف أيقونة خدمة العملاء (الجوال أو الواتساب) if (!item.getAttribute('data-styled')) { // 1. تحسين مظهر الحاوية بالكامل item.style.setProperty('background', 'rgba(255, 255, 255, 0.05)', 'important'); item.style.setProperty('padding', '8px 12px', 'important'); item.style.setProperty('border-radius', '30px', 'important'); item.style.setProperty('transition', 'all 0.3s ease', 'important'); item.style.setProperty('margin-bottom', '5px', 'important'); // 2. استهداف الأيقونة (الصورة أو الـ Icon) داخل الكلاس const icon = item.querySelector('img, i, span'); if (icon) { icon.style.setProperty('background', '#ffd700', 'important'); // لون متجرك الأصفر icon.style.setProperty('padding', '6px', 'important'); icon.style.setProperty('border-radius', '50%', 'important'); icon.style.setProperty('color', '#000', 'important'); icon.style.setProperty('box-shadow', '0 0 10px rgba(255, 215, 0, 0.5)', 'important'); // إضافة حركة النبض للأيقونة لجعلها مثل الـ Pop icon.animate([ { transform: 'scale(1)', boxShadow: '0 0 0 0 rgba(255, 215, 0, 0.7)' }, { transform: 'scale(1.2)', boxShadow: '0 0 0 8px rgba(255, 215, 0, 0)' }, { transform: 'scale(1)', boxShadow: '0 0 0 0 rgba(255, 215, 0, 0)' } ], { duration: 2500, iterations: Infinity }); } item.setAttribute('data-styled', 'true'); } }); }; // مراقبة الصفحة لتطبيق الكود فور ظهور العنصر const observer = new MutationObserver(enhanceCustomerService); observer.observe(document.body, { childList: true, subtree: true }); // تشغيل فوري enhanceCustomerService();