document.addEventListener("DOMContentLoaded", function () { const footerTitle = document.querySelector('#app > div.app-inner.flex.flex-col.min-h-full > footer > div.sahm-store-footer__inner.store-footer__inner.border-gray-100 > div > div > div > h3'); if (footerTitle) { footerTitle.textContent = "حسابات فوا"; } }); document.addEventListener("DOMContentLoaded", function () { const descWrapper = document.querySelector(".product__description"); const desc = document.querySelector(".product__description article"); const target = document.querySelector(".product-single #main-content .container > .flex.flex-col.items-start.md\\:flex-row"); if (!descWrapper || !desc || !target) return; const maxHeight = 65; if (!document.querySelector(".show-more-description")) { if (descWrapper.scrollHeight > maxHeight) { descWrapper.style.maxHeight = maxHeight + "px"; descWrapper.style.overflow = "hidden"; const btn = document.createElement("button"); btn.innerText = "عرض تفاصيل أكثر"; btn.className = "show-more-description"; descWrapper.after(btn); let fullDesc = document.querySelector(".product-full-description"); if (!fullDesc) { fullDesc = document.createElement("section"); fullDesc.className = "product-full-description"; fullDesc.innerHTML = `

وصف المنتج

${desc.innerHTML}
`; target.after(fullDesc); } btn.addEventListener("click", function () { const title = fullDesc.querySelector(".full-desc-title"); if (title) { const y = title.getBoundingClientRect().top + window.pageYOffset - 150; window.scrollTo({ top: y, behavior: "smooth" }); } }); } } }); (function () { function addWhatsapp() { const socialList = document.querySelector( '#app > div.app-inner.flex.flex-col.min-h-full > footer > div.sahm-store-footer__inner.store-footer__inner.border-gray-100 > div > div > div > salla-social > ul' ); if (!socialList) return false; if (socialList.querySelector('.whatsapp-item')) return true; const li = document.createElement('li'); li.className = 's-social-link whatsapp-item'; li.innerHTML = ` `; socialList.appendChild(li); return true; } if (addWhatsapp()) return; const observer = new MutationObserver(() => { if (addWhatsapp()) { observer.disconnect(); } }); observer.observe(document.body, { childList: true, subtree: true }); })();