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 = `