// إضافة لوقو جديد const header = document.querySelector('.main-nav-container .container'); if (header) { const newHeader = document.createElement("div"); newHeader.innerHTML = ` `; header.appendChild(newHeader); } // البحث كأيقونة const searchBox = document.querySelector(".header-search"); const cartArea = document.querySelector("salla-cart-summary") || document.querySelector(".s-cart-summary-wrapper") || document.querySelector("#s-cart-icon")?.parentElement; if (searchBox && cartArea) { searchBox.style.display = "none"; const btn = document.createElement("button"); btn.className = "header-btn"; btn.innerHTML = ''; cartArea.parentElement.insertBefore(btn, cartArea); btn.onclick = () => { searchBox.style.display = searchBox.style.display === "none" ? "block" : "none"; }; } // حقوق التصميم window.onload = function () { const target = document.querySelector(".copyright-text p"); if (target) { const newEl = document.createElement("div"); newEl.innerHTML = ` :designed by ddandesign `; target.after(newEl); } }; function moveSocialItem() { const firstSocial = document.querySelector(".store-footer__inner .s-social-list"); const firstContactSlot = document.querySelector(".store-footer__inner .s-contacts-list-vertical"); if (!firstSocial || !firstContactSlot) return false; firstContactSlot.appendChild(firstSocial); return true; } const socialObserver = new MutationObserver(() => { if (moveSocialItem()) socialObserver.disconnect(); }); socialObserver.observe(document.body, { childList: true, subtree: true }); // شريط العلامات التجارية const CreatTextTicker = () => { const danticker = document.createElement('div'); danticker.classList.add('text-ticker', 'promation-tiker'); const title = `
اكتشف علاماتنا التجارية
`; const brands = [ { link: "https://rfeen.com/", img: "https://cdn.salla.sa/BrABPB/uBNccWA8heIrPFjfWdtrr5hYG9wc7cbZ5vOE5TtJ.png" }, { link: "https://gravityabaya.com/", img: "https://cdn.salla.sa/cdn-cgi/image/fit=scale-down,width=400,height=400,onerror=redirect,format=auto/rVDEl/9bCLmFqM4VL1WbLVknpYrlURLWC7TDJWLtVEzZ1U.png" } ]; const makeBrand = b => `
`; const repeatedBrands = Array(7) .fill(brands.map(makeBrand).join("")) .join(""); danticker.innerHTML = ` ${title}
`; const section = document.querySelector('.index footer.store-footer'); if (section) section.before(danticker); }; window.addEventListener('load', CreatTextTicker);