(function() { // 1. أزرار التواصل العائمة if (!document.querySelector('.revan-floating-action')) { const floatingDiv = document.createElement('div'); floatingDiv.className = 'revan-floating-action'; floatingDiv.innerHTML = ` `; document.body.appendChild(floatingDiv); } // 2. شريط التنويه الأصفر المتحرك (REX كود) function createUrgencyTicker() { if (document.querySelector('.custom-ticker-wrapper')) return; const tickerContainer = document.createElement('div'); tickerContainer.className = 'custom-ticker-wrapper'; const textContent = "🔥 عروض لفترة محدودة ! خصم 20% كود الخصم ( REX ) التفعيل فوري وتلقائي خلال ثواني "; tickerContainer.innerHTML = `
${textContent} ${textContent} ${textContent} ${textContent} ${textContent}
`; document.body.insertBefore(tickerContainer, document.body.firstChild); } createUrgencyTicker(); window.addEventListener('DOMContentLoaded', createUrgencyTicker); setTimeout(createUrgencyTicker, 1000); // 3. قناص إلغاء شاشة الترحيب وكلمة تخطي فوراً function removeSplashScreen() { const splash = document.querySelector('[class*="splash"], [id*="splash"], [class*="welcome"], [class*="loading-page"]'); const skipBtn = document.querySelector('[class*="skip"], [id*="skip"], .skip-button'); if (splash) { splash.remove(); } if (skipBtn) { skipBtn.click(); skipBtn.remove(); } } removeSplashScreen(); document.addEventListener("DOMContentLoaded", removeSplashScreen); setTimeout(removeSplashScreen, 500); // 4. مراقب إشعار السلة (Toast) const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { if (mutation.target.classList.contains('s-add-product-toast--visible')) { const card = mutation.target.querySelector('.s-add-product-toast__card'); if (card) { card.style.animation = 'toastBounce 0.5s ease-out forwards'; } } }); }); const targetToast = document.querySelector('angel-add-product-toast'); if (targetToast) { observer.observe(targetToast, { attributes: true, attributeFilter: ['class'] }); } // 5. تحميل مكتبة الأيقونات if (!document.querySelector('link[href*="font-awesome"]')) { const fa = document.createElement('link'); fa.rel = 'stylesheet'; fa.href = 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css'; document.head.appendChild(fa); } })(); (function() { // 6. تغيير نص الحقوق في الأسفل بالتحديد دون أي تأثير على بقية الفوتر function updateCopyrights() { const copyrightSpan = document.querySelector('.copyrights p'); if (copyrightSpan) { copyrightSpan.innerHTML = 'صنع بإتقان | فريق ريكس'; } } updateCopyrights(); window.addEventListener('DOMContentLoaded', updateCopyrights); setTimeout(updateCopyrights, 1000); setTimeout(updateCopyrights, 3000); })(); // 7. تأثير توهج حقل الإيميل في الفوتر باللون الزيتوني الجديد document.addEventListener('DOMContentLoaded', () => { const mailInput = document.querySelector('.mail-input'); const mailContainer = document.querySelector('.footer-top'); if(mailInput && mailContainer) { mailInput.addEventListener('focus', () => { mailContainer.style.borderColor = '#233116'; mailContainer.style.boxShadow = '0 0 20px rgba(35, 49, 22, 0.4)'; }); mailInput.addEventListener('blur', () => { mailContainer.style.borderColor = 'rgba(255, 255, 255, 0.05)'; mailContainer.style.boxShadow = 'none'; }); } });