document.querySelector(".inner.bg-inherit").classList.add("container") document.querySelector("#main-nav > div > div").classList.add("container") // document.querySelector("#app > div > section.s-block.s-block--fixed-banner.wide-placeholder > div").classList.remove("container") document.querySelector(".s-block.s-block--title-only").classList.add("s-block__title") let lang = document.querySelector("#s-block--animated-products-5 > div > div > div > h2").innerText let title; if(lang == "Coffee Boxes"){ title = "Customer Reviews" }else{ title = "آراء العملاء" } const h2 = document.createElement("h2") h2.innerText = title h2.style.textAlign = "start" h2.style.color = "#291515" h2.style.marginInline = "15px" document.querySelector("#app > div > section.s-block.s-block--title-only > div").appendChild(h2) function waitForElement(selector, callback) { const interval = setInterval(() => { const element = document.querySelector(selector); if (element) { console.log("Element found!"); clearInterval(interval); // Stop checking once the element is found callback(element); // Execute customization code } else { console.log("Still waiting for element..."); } }, 500); // Check every 500ms } // Call the function to wait for to load waitForElement("salla-infinite-scroll", (infiniteScrollElement) => { // Place your customization code here console.log("Customizing element:", infiniteScrollElement); // Example customization infiniteScrollElement.style.backgroundColor = "lightblue"; }); console.log("Starting to observe the DOM..."); observer.observe(document.body, { childList: true, subtree: true }); document.querySelector("salla-infinite-scroll div").style.background = "#a79773"