document.addEventListener("DOMContentLoaded", function () { function addLinkedInIcon() { const socialList = document.querySelector(".footer-social-outer .s-social-list"); if (!socialList) return; // منع التكرار if (socialList.querySelector('.s-social-link a[href="https://www.linkedin.com/company/linkupksa/"]')) return; const li = document.createElement("li"); li.className = "s-social-link linkedin-custom-icon"; li.innerHTML = ` `; const instagramItem = socialList.querySelector('a[aria-label="instagram"]')?.closest(".s-social-link"); if (instagramItem) { instagramItem.insertAdjacentElement("afterend", li); } else { socialList.appendChild(li); } } function applyLinkedInStyle() { if (document.getElementById("linkedin-custom-style")) return; const style = document.createElement("style"); style.id = "linkedin-custom-style"; style.textContent = ` .footer-social-outer .linkedin-custom-icon .s-social-icon svg { width: 18px !important; height: 18px !important; display: block; } `; document.head.appendChild(style); } function init() { addLinkedInIcon(); applyLinkedInStyle(); } init(); const observer = new MutationObserver(function () { if (document.querySelector(".footer-social-outer .s-social-list")) { init(); } }); observer.observe(document.body, { childList: true, subtree: true }); });