window.addEventListener("load", function () { setTimeout(() => { const subtitles = document.querySelectorAll('.product-card__subtitle'); subtitles.forEach(subtitle => { // منع التكرار if (subtitle.parentNode.querySelector('.custom-product-stars')) return; const stars = document.createElement('div'); stars.className = 'custom-product-stars'; stars.innerHTML = ` `; // بعد الوصف مباشرة subtitle.insertAdjacentElement('afterend', stars); }); }, 1000); }); const addDeveloperText = () => { const footer = document.querySelector('.footer-bottom'); if (!footer) return; // منع التكرار if (footer.querySelector('.joserve-dev')) return; const dev = document.createElement('div'); dev.className = 'joserve-dev '; dev.innerHTML = 'تطوير جوسيرف'; footer.insertAdjacentElement('beforeend', dev); }; // تشغيل متكرر بسيط لحد ما الفوتر يظهر const interval = setInterval(() => { addDeveloperText(); if (document.querySelector('.joserve-dev')) { clearInterval(interval); } }, 500); // window.addEventListener('load', () => { // setTimeout(() => { // const productOptions = document.querySelector('salla-product-options'); // if (!productOptions || document.querySelector('.custom-free-shipping')) { // return; // } // const section = document.createElement('div'); // section.className = 'custom-free-shipping'; // section.innerHTML = ` //
//
// // // //
//
//

شحن مجاني

//

// احصل على شحن مجاني عند إضافة // 290 ر.س للسلة //

//
//
//
//
//
// `; // productOptions.insertAdjacentElement('afterend', section); // }, 1200); // }); window.addEventListener('scroll', function () { if (window.scrollY > 100) { document.body.classList.add('scrolled'); } else { document.body.classList.remove('scrolled'); } }); // window.addEventListener('load', () => { // const addDetailsSection = () => { // const productOptions = document.querySelector('salla-product-options'); // if (!productOptions || document.querySelector('.custom-details-box')) return; // const section = document.createElement('div'); // section.className = 'custom-details-box'; // section.innerHTML = ` //
//

تفاصيل لا يستغنى عنها

//

تناغم مثالي مع سواد العبايه وفخامتها

//
// `; // productOptions.insertAdjacentElement('afterend', section); // }; // setTimeout(addDetailsSection, 1000); // }); window.addEventListener('load', () => { setTimeout(() => { const productOptions = document.querySelector('salla-product-options'); if (!productOptions) return; // تفاصيل لا يستغنى عنها if (!document.querySelector('.custom-details-box')) { const detailsSection = document.createElement('div'); detailsSection.className = 'custom-details-box'; detailsSection.innerHTML = `

تفاصيل لا يستغنى عنها

تناغم مثالي مع سواد العبايه وفخامتها

`; productOptions.insertAdjacentElement('afterend', detailsSection); } // الشحن المجاني تحتها مباشرة if (!document.querySelector('.custom-free-shipping')) { const shippingSection = document.createElement('div'); shippingSection.className = 'custom-free-shipping'; shippingSection.innerHTML = `

شحن مجاني

`; document .querySelector('.custom-details-box') .insertAdjacentElement('afterend', shippingSection); } }, 1200); }); window.addEventListener('load', () => { const addReviewSummary = () => { const commentForm = document.querySelector('.s-comment-form-wrapper'); if (!commentForm || document.querySelector('.custom-review-summary')) { return; } const section = document.createElement('div'); section.className = 'custom-review-summary'; section.innerHTML = `

%100

أوصوا بالمنتج

`; commentForm.insertAdjacentElement('afterend', section); }; setTimeout(addReviewSummary, 1000); }); window.addEventListener("load", function () { const footer = document.querySelector('.footer-bottom .container'); if (!footer) return; // منع التكرار if (document.querySelector('.joserve-dev')) return; const dev = document.createElement('div'); dev.className = 'joserve-dev'; dev.innerHTML = `تطوير جو سيرف`; footer.appendChild(dev); }); // ===== عداد الزوار (110 - 250) ===== (function() { function rand(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } let count = rand(110, 250); const style = document.createElement('style'); style.textContent = ` @keyframes pulse_vc { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(1.4)} } `; document.head.appendChild(style); const el = document.createElement('div'); el.id = 'visitor-counter'; el.style.cssText = ` position: fixed; bottom: 14px; left: 14px; border-radius: 16px; padding: 10px 20px; font-family: inherit; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.10); z-index: 9999; direction: rtl; `; el.innerHTML = `
${count} زائر نشط الان
`; document.body.appendChild(el); function updateCount() { const change = rand(-2, 2); count = Math.min(250, Math.max(110, count + change)); const numEl = document.getElementById('vc-num'); if (numEl) numEl.textContent = count; setTimeout(updateCount, rand(8000, 15000)); } setTimeout(updateCount, rand(8000, 15000)); })();