document.addEventListener('DOMContentLoaded', () => { // 1. Image insertion after first unordered list const firstUnorderedList = document.querySelector(".product-single-top-description > article > ul:first-of-type"); if (firstUnorderedList) { const newParagraph = document.createElement("p"); newParagraph.setAttribute("class", "features-pic"); newParagraph.innerHTML = ''; firstUnorderedList.after(newParagraph); } // 2. Banner slider video insertion const bannerSlider = document.querySelector("section.s-block.banners-slider.banners-slider--6.slide"); if (bannerSlider) { const newSection = document.createElement("section"); newSection.setAttribute("class", "kfaya ya aya"); newSection.innerHTML = ` `; bannerSlider.before(newSection); } // 3. Offer section and thumbnail section reordering const offerSec = document.querySelector('.product-single salla-offer'); const thumbnailSec = document.querySelector('.product-single.thumbnails'); if (offerSec && thumbnailSec) { thumbnailSec.before(offerSec); } // 4. Additional video section const section = document.querySelector("section.s-block.s-block--enhanced-features.container"); if (section) { const newSection = document.createElement("section"); newSection.setAttribute("class", "feedbacKKs"); newSection.innerHTML = ` `; section.before(newSection); } // 6. Description element color modification const descriptionElements = document.querySelectorAll(".product-single-top-description.mb-5 > article strong"); descriptionElements.forEach(element => { if (element.style.color) { const color = element.style.color; element.style.setProperty("color", color, "important"); } }); // 7. product package let headerItem = document.querySelector(".product-single .app-inner > .container > .product-single"); let newSection = document.createElement("section"); newSection.setAttribute("class", "package-product"); newSection.innerHTML = `

اطلب واختر التغليف اللى يناسبك

22 ر.س

44 ر.س
`; let currentUrl = window.location.href; // Check if the URL matches and hide the section if true if (currentUrl === "https://coomowatches.com/%D8%BA%D9%84%D9%81-%D8%B3%D8%A7%D8%B9%D8%AA%D9%83-%D8%A7%D8%AE%D8%AA%D8%B1-%D8%A7%D9%84%D8%AA%D8%BA%D9%84%D9%8A%D9%81-%D8%A7%D9%84%D9%85%D9%86%D8%A7%D8%B3%D8%A8/p2106048452") { newSection.style.display = "none"; } headerItem.after(newSection); });