(function () { // يظهر في هذا المنتج فقط if (!/(?:^|\/)p536920968(?:-|\/|$)/.test(location.pathname)) { return; } function addVideo() { const description = document.querySelector( ".product__description #more-content" ); if (!description) return false; if (document.getElementById("hikaya-towel-video")) return true; const video = document.createElement("video"); video.id = "hikaya-towel-video"; video.src = "https://c.top4top.io/m_3935nxeco1.mov"; video.autoplay = true; video.muted = true; video.defaultMuted = true; video.loop = true; video.playsInline = true; video.controls = true; video.preload = "metadata"; // حجم صغير، في المنتصف، بدون قص الفيديو video.style.cssText = "display:block;width:100%;max-width:300px;" + "height:auto;margin:0 auto 20px;border-radius:12px;"; description.prepend(video); // فتح الوصف ليظهر الفيديو كاملًا description.style.setProperty( "max-height", "none", "important" ); const moreButton = document.querySelector( ".product__description #btn-show-more" ); if (moreButton) { moreButton.style.display = "none"; } video.play().catch(function () {}); return true; } if (addVideo()) return; const observer = new MutationObserver(function () { if (addVideo()) { observer.disconnect(); } }); observer.observe(document.documentElement, { childList: true, subtree: true }); setTimeout(function () { observer.disconnect(); }, 15000); })(); (function () { if (!/(?:^|\/)p536920968(?:-|\/|$)/.test(location.pathname)) { return; } const photos = [ { src: "https://cdn.salla.sa/VqnDaj/PPlOufHRmChOZ9vjGG9p2yabcmMnuP9PhkgilTSZ.png", alt: "ألوان المناشف بخطوط الستان" }, { src: "https://cdn.salla.sa/VqnDaj/XHJVwB2s4FOlgSkcaXJ8EuUGuEBJevw6fSivtYLY.png", alt: "تفاصيل خامة المنشفة وبطاقة المنتج" }, { src: "https://cdn.salla.sa/VqnDaj/uLQ5yb8S9ZzRdlqt7CPfgcn0FZMl5M8SNh4ybpTD.png", alt: "المناشف المطوية وألوانها" } ]; function addPhotos() { const description = document.querySelector( ".product__description #more-content" ); if (!description) return false; if (document.getElementById("hikaya-real-photos")) return true; const section = document.createElement("section"); section.id = "hikaya-real-photos"; section.dir = "rtl"; section.style.cssText = "max-width:560px;margin:20px auto;padding:16px;" + "background:#f8f5ef;border:1px solid #e1d3b6;" + "border-radius:14px;text-align:center;"; section.innerHTML = `

صور المناشف على الطبيعة

شاهدي الألوان وتفاصيل الخامة عن قرب — اضغطي للتكبير

${photos.map(function (photo) { return ` ${photo.alt} `; }).join("")}
`; // فتح الصورة من معرض المنتج الموجود بالمتجر section.addEventListener("click", function (event) { const link = event.target.closest("a[data-hikaya-photo]"); if (!link) return; const original = Array.from( document.querySelectorAll( 'a[data-fslightbox="product_536920968"]' ) ).find(function (item) { return item.href === link.href; }); if (original) { event.preventDefault(); original.click(); } }); const video = description.querySelector("#hikaya-towel-video"); if (video) { video.insertAdjacentElement("afterend", section); } else { description.prepend(section); } description.style.setProperty("max-height", "none", "important"); const moreButton = document.querySelector( ".product__description #btn-show-more" ); if (moreButton) moreButton.style.display = "none"; return true; } if (addPhotos()) return; const observer = new MutationObserver(function () { if (addPhotos()) observer.disconnect(); }); observer.observe(document.documentElement, { childList: true, subtree: true }); setTimeout(function () { observer.disconnect(); }, 15000); })(); (function () { if (!/(?:^|\/)p727850388(?:-|\/|$)/.test(location.pathname)) { return; } function addVideo() { const description = document.querySelector( ".product__description #more-content" ); if (!description) return false; if (document.getElementById("hikaya-video-727850388")) return true; const video = document.createElement("video"); video.id = "hikaya-video-727850388"; video.src = "https://c.top4top.io/m_3935nxeco1.mov"; video.autoplay = true; video.muted = true; video.defaultMuted = true; video.loop = true; video.playsInline = true; video.controls = true; video.preload = "metadata"; video.style.cssText = "display:block;width:100%;max-width:300px;" + "height:auto;margin:0 auto 20px;border-radius:12px;"; description.prepend(video); description.style.setProperty("max-height", "none", "important"); const moreButton = document.querySelector( ".product__description #btn-show-more" ); if (moreButton) moreButton.style.display = "none"; video.play().catch(function () {}); return true; } if (addVideo()) return; const observer = new MutationObserver(function () { if (addVideo()) observer.disconnect(); }); observer.observe(document.documentElement, { childList: true, subtree: true }); setTimeout(function () { observer.disconnect(); }, 15000); })(); (function () { if (!/(?:^|\/)p727850388(?:-|\/|$)/.test(location.pathname)) { return; } const photos = [ { src: "https://cdn.salla.sa/VqnDaj/uyKeXYbK8njFvVkHQSXNv23Xx8WHFc4MWfRPhqwC.png", alt: "ألوان المناشف بخطوط الستان" }, { src: "https://cdn.salla.sa/VqnDaj/IhcRYLZWDIv7zlaqoUQnaLS2u6p6LurRjucL1FrH.png", alt: "تفاصيل خامة المنشفة وبطاقة المنتج" }, { src: "https://cdn.salla.sa/VqnDaj/xsCjJ7xCMWbQRUQCRDx4SSz7WzGcf0GiwAnRMT98.png", alt: "المناشف المطوية وألوانها" } ]; function addPhotos() { const description = document.querySelector( ".product__description #more-content" ); if (!description) return false; if (document.getElementById("hikaya-photos-727850388")) return true; const section = document.createElement("section"); section.id = "hikaya-photos-727850388"; section.dir = "rtl"; section.style.cssText = "max-width:560px;margin:20px auto;padding:16px;" + "background:#f8f5ef;border:1px solid #e1d3b6;" + "border-radius:14px;text-align:center;"; section.innerHTML = `

صور المناشف على الطبيعة

شاهدي الألوان وتفاصيل الخامة عن قرب — اضغطي للتكبير

${photos.map(function (photo) { return ` ${photo.alt} `; }).join("")}
`; section.addEventListener("click", function (event) { const link = event.target.closest("a[data-hikaya-photo]"); if (!link) return; const original = Array.from( document.querySelectorAll( 'a[data-fslightbox="product_727850388"]' ) ).find(function (item) { return item.href === link.href; }); if (original) { event.preventDefault(); original.click(); } }); const video = description.querySelector( "#hikaya-video-727850388" ); if (video) { video.insertAdjacentElement("afterend", section); } else { description.prepend(section); } description.style.setProperty("max-height", "none", "important"); const moreButton = document.querySelector( ".product__description #btn-show-more" ); if (moreButton) moreButton.style.display = "none"; return true; } if (addPhotos()) return; const observer = new MutationObserver(function () { if (addPhotos()) observer.disconnect(); }); observer.observe(document.documentElement, { childList: true, subtree: true }); setTimeout(function () { observer.disconnect(); }, 15000); })();