/* Add custom Js styles below */ (function () { const apply = () => { const about = document.querySelector("#about-2"); if (!about) return; const p = about.querySelector("p"); if (!p) return; // لا تعيد التطبيق if (p.querySelector(".promo-code")) return; p.innerHTML = p.innerHTML.replace( /\bHITAQ\b/, 'HITAQ' ); }; // محاولة مباشرة apply(); // مراقبة DOM لأن سلة قد تعيد بناء القسم بعد التحميل const observer = new MutationObserver(() => apply()); observer.observe(document.body, { childList: true, subtree: true }); })(); document.addEventListener("DOMContentLoaded", function () { const section = document.querySelector(".animated-text"); if (!section) return; // لا يعمل خارج هذا القسم const firstLi = section.querySelector("li:first-child"); if (!firstLi) return; // إزالة أي ستايل يسبب حركة داخل هذا القسم فقط firstLi.removeAttribute("style"); const mainLink = firstLi.querySelector("a"); if (!mainLink) return; // إنشاء الحاوية const wrapper = document.createElement("div"); wrapper.className = "text-vertical"; // النص الأساسي const mainText = document.createElement("span"); mainText.className = "main-text"; mainText.textContent = mainLink.textContent; // رابط معرفة المزيد const moreLink = document.createElement("a"); moreLink.className = "more-link"; moreLink.href = "#"; // ← ضع الرابط الحقيقي moreLink.textContent = "لمعرفة المزيد"; // استبدال محتوى هذا العنصر فقط firstLi.innerHTML = ""; wrapper.appendChild(mainText); wrapper.appendChild(moreLink); firstLi.appendChild(wrapper); });