/* ========================================================= PRIVAS FULL CLEAN JAVASCRIPT Preloader + Homepage Editorial + Mobile Menu Swipe Fade + Smooth Scroll Reveal ========================================================= */ document.addEventListener("DOMContentLoaded", function () { /* ========================================================= PRIVAS - HIDE CSS FIRST PRELOADER مدة ظهور اللوجو: 1.1 ثانية ========================================================= */ (function () { function hidePrivasCssPreloader() { setTimeout(function () { document.documentElement.classList.add("privas-loaded"); document.body.classList.add("privas-loaded-body"); }, 1100); } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", hidePrivasCssPreloader); } else { hidePrivasCssPreloader(); } })(); /* ========================================================= 2) PRIVAS HOMEPAGE EDITORIAL SECTION ========================================================= */ var isHome = window.location.pathname === "/" || window.location.pathname === "/ar" || window.location.pathname === "/ar/" || window.location.pathname === "/en" || window.location.pathname === "/en/"; if (isHome && !document.querySelector("#privas-editorial-home")) { var heroImage = "https://cdn.salla.sa/zvPBPp/products/jf6mviCPgK5oNnNIFNNn0m8g26jeLlVmTV7THOPe.png"; var card1Image = "https://cdn.salla.sa/zvPBPp/products/YUxeuEtdcrWfBr0ivG1mASlij8Kff2VF7RWtHZWS.png"; var card2Image = "https://cdn.salla.sa/zvPBPp/products/Y6wNijGj17cmXKgm2EGuCgCe2VbfoE3Lh6BS64W8.png"; var card3Image = "https://cdn.salla.sa/zvPBPp/products/nHnFf6XMma7T3hocPWW0LUCCkmCAIDX9t7ZR9j9G.png"; var section = document.createElement("section"); section.id = "privas-editorial-home"; section.innerHTML = `
PRIVAS

THE FIRST
COLLECTION

قطع فريدة ونادرة، اختيرت لكِ أنتِ فقط

اكتشفي الكولكشن

The First Collection

مختاراتنا الأولى من العبايات والحقائب

Our Story

من دبي، بدأت PRIVAS بفكرة قطع نادرة لا تتكرر

Style Inspirations

إلهام لإطلالة أنيقة وهادئة ومختلفة

Elegance in Every Detail

وُلدت PRIVAS في دبي بروح عصرية وذوق عالمي، لتقدّم قطعًا فريدة ونادرة للمرأة التي تبحث عن حضور راقٍ، تفاصيل متقنة، وأناقة تشبهها وحدها.

Luxury Pieces

قطع راقية بخامات وتفاصيل مختارة بعناية.

Curated Collections

كولكشنات محدودة صُممت لتمنحك حضورًا مختلفًا.

Timeless Style

أناقة هادئة تبقى راقية في كل وقت.

`; var firstBlock = document.querySelector(".s-block") || document.querySelector("salla-products-slider") || document.querySelector(".container"); if (firstBlock && firstBlock.parentNode) { firstBlock.parentNode.insertBefore(section, firstBlock); } else { document.body.prepend(section); } } /* ========================================================= 3) MOBILE MENU SWIPE CLOSE RIGHT / LEFT + FADE ========================================================= */ var startX = 0; var startY = 0; var currentX = 0; var dragging = false; var isClosing = false; function getWrapper() { return document.querySelector(".mm-ocd"); } function getContent() { return document.querySelector(".mm-ocd__content"); } function getBackdrop() { return document.querySelector(".mm-ocd__backdrop"); } function isMenuOpen() { var wrapper = getWrapper(); var content = getContent(); if (!wrapper || !content) return false; var wrapperStyle = window.getComputedStyle(wrapper); var contentRect = content.getBoundingClientRect(); return ( wrapperStyle.display !== "none" && wrapperStyle.visibility !== "hidden" && contentRect.width > 0 && contentRect.height > 0 && !wrapper.classList.contains("privas-menu-hidden") ); } function resetMenuState() { var wrapper = getWrapper(); var content = getContent(); var backdrop = getBackdrop(); isClosing = false; if (wrapper) { wrapper.classList.remove("privas-menu-hidden"); wrapper.classList.remove("privas-menu-fading"); wrapper.style.pointerEvents = ""; } if (content) { content.style.transition = ""; content.style.transform = ""; content.style.opacity = ""; content.style.filter = ""; } if (backdrop) { backdrop.style.transition = ""; backdrop.style.opacity = ""; } } function nativeCloseMenu() { var nativeClose = document.querySelector( ".close-mobile-menu, .btn--close, .btn--close-sm" ); if (nativeClose) { nativeClose.click(); return; } var wrapper = getWrapper(); if (wrapper) { wrapper.classList.add("privas-menu-hidden"); wrapper.style.pointerEvents = "none"; } document.body.classList.remove("overflow-hidden"); document.documentElement.classList.remove("overflow-hidden"); } function closeMenuSmooth(direction) { if (isClosing) return; var wrapper = getWrapper(); var content = getContent(); var backdrop = getBackdrop(); if (!wrapper || !content) return; isClosing = true; var move = direction === "right" ? "45px" : "-45px"; wrapper.classList.add("privas-menu-fading"); content.style.transition = "transform 0.34s ease, opacity 0.34s ease, filter 0.34s ease"; content.style.transform = "translateX(" + move + "px)"; content.style.opacity = "0"; content.style.filter = "blur(2px)"; if (backdrop) { backdrop.style.transition = "opacity 0.34s ease"; backdrop.style.opacity = "0"; } setTimeout(function () { nativeCloseMenu(); setTimeout(function () { if (wrapper) { wrapper.classList.remove("privas-menu-fading"); wrapper.classList.add("privas-menu-hidden"); wrapper.style.pointerEvents = "none"; } if (content) { content.style.transition = ""; content.style.transform = ""; content.style.opacity = ""; content.style.filter = ""; } if (backdrop) { backdrop.style.transition = ""; backdrop.style.opacity = ""; } isClosing = false; }, 80); }, 340); } document.addEventListener( "click", function (e) { if (e.target.closest(".mburger, [href='#mobile-menu'], .sicon-menu")) { resetMenuState(); } if (e.target.closest(".mm-ocd__backdrop")) { e.preventDefault(); closeMenuSmooth("left"); } var menuLink = e.target.closest( "#mobile-menu a, .mobile-menu a, .mm-spn a" ); if (menuLink && isMenuOpen()) { setTimeout(function () { closeMenuSmooth("left"); }, 120); } }, true ); document.addEventListener( "touchstart", function (e) { var content = getContent(); if (!content || !isMenuOpen() || isClosing) return; if (!e.target.closest(".mm-ocd__content")) return; startX = e.touches[0].clientX; startY = e.touches[0].clientY; currentX = startX; dragging = true; content.style.transition = "none"; }, { passive: true } ); document.addEventListener( "touchmove", function (e) { if (!dragging || isClosing) return; var content = getContent(); if (!content) return; currentX = e.touches[0].clientX; var diffX = currentX - startX; var diffY = Math.abs(e.touches[0].clientY - startY); if (Math.abs(diffX) > 8 && diffY < 70) { var move = Math.max(Math.min(diffX, 150), -150); var fade = Math.max(1 - Math.abs(move) / 170, 0.35); content.style.transform = "translateX(" + move + "px)"; content.style.opacity = fade; } }, { passive: true } ); document.addEventListener( "touchend", function () { if (!dragging || isClosing) return; var content = getContent(); if (!content) return; var diffX = currentX - startX; dragging = false; if (Math.abs(diffX) > 45) { closeMenuSmooth(diffX > 0 ? "right" : "left"); } else { content.style.transition = "transform 0.24s ease, opacity 0.24s ease"; content.style.transform = "translateX(0)"; content.style.opacity = "1"; } }, { passive: true } ); document.querySelectorAll(".privas-menu-close").forEach(function (btn) { btn.remove(); }); /* ========================================================= 4) PRIVAS SMOOTH SCROLL REVEAL ANIMATIONS ========================================================= */ function initPrivasScrollReveal() { var revealSelectors = [ ".privas-hero-editorial", ".privas-hero-content", ".privas-editorial-card", ".privas-brand-message", ".privas-value", ".privas-featured-title", ".s-product-card-entry" ]; var elements = document.querySelectorAll(revealSelectors.join(",")); elements.forEach(function (el) { if (!el.classList.contains("privas-reveal")) { el.classList.add("privas-reveal"); } }); var observer = new IntersectionObserver( function (entries) { entries.forEach(function (entry) { if (entry.isIntersecting) { entry.target.classList.add("privas-visible"); observer.unobserve(entry.target); } }); }, { threshold: 0.14, rootMargin: "0px 0px -40px 0px" } ); elements.forEach(function (el) { observer.observe(el); }); } initPrivasScrollReveal(); setTimeout(initPrivasScrollReveal, 1200); setTimeout(initPrivasScrollReveal, 2500); /* ========================================================= 5) KEEP PRIVAS CAPITAL IN DYNAMIC TEXTS ========================================================= */ function fixPrivasTextCapitalization() { document.querySelectorAll("body *").forEach(function (el) { if ( el.children.length === 0 && el.textContent && el.textContent.includes("Privas") ) { el.textContent = el.textContent.replace(/Privas/g, "PRIVAS"); } }); } fixPrivasTextCapitalization(); setTimeout(fixPrivasTextCapitalization, 1000); }); /* ========================================================= PRIVAS - MARK CATEGORY PAGES ONLY يضيف كلاس لصفحات التصنيف فقط حتى لا يتأثر الهيدر أو باقي الصفحات ========================================================= */ document.addEventListener('DOMContentLoaded', function () { const path = window.location.pathname; const isCategoryPage = path.includes('/c') || path.includes('/عبايات') || document.querySelector('.s-products-list-wrapper'); const isProductPage = document.querySelector('.s-product-single') || document.querySelector('salla-product-options') || path.includes('/p'); if (isCategoryPage && !isProductPage) { document.body.classList.add('privas-category-page'); } }); /* ========================================================= PRIVAS - FORCE HOME FEATURED CARDS INTO 3-COLUMN GRID يمسك الأب الحقيقي لكروت المنتجات في الصفحة الرئيسية ========================================================= */ (function () { function fixPrivasFeaturedProducts() { const path = window.location.pathname; const isHome = path === '/' || path === '/ar' || path === '/ar/' || path === '/en' || path === '/en/'; if (!isHome) return; document.body.classList.add('privas-home-page'); const headings = Array.from( document.querySelectorAll('h1, h2, h3, .s-block__title, .section-title') ); const featuredHeading = headings.find(function (el) { const text = el.textContent ? el.textContent.trim().toLowerCase() : ''; return text.includes('featured pieces'); }); if (!featuredHeading) return; let section = featuredHeading.closest('section, .s-block, .container, div'); for (let i = 0; i < 10 && section; i++) { const cards = section.querySelectorAll('.s-product-card-entry'); if (cards.length) { const cardsParent = cards[0].parentElement; if (cardsParent) { cardsParent.classList.add('privas-featured-cards-row'); section.classList.add('privas-featured-section-fixed'); } cards.forEach(function (card) { card.classList.add('privas-featured-card'); }); return; } const next = section.nextElementSibling; if (next && next.querySelectorAll('.s-product-card-entry').length) { const cards = next.querySelectorAll('.s-product-card-entry'); const cardsParent = cards[0].parentElement; if (cardsParent) { cardsParent.classList.add('privas-featured-cards-row'); next.classList.add('privas-featured-section-fixed'); } cards.forEach(function (card) { card.classList.add('privas-featured-card'); }); return; } section = section.parentElement; } } document.addEventListener('DOMContentLoaded', fixPrivasFeaturedProducts); window.addEventListener('load', fixPrivasFeaturedProducts); setTimeout(fixPrivasFeaturedProducts, 700); setTimeout(fixPrivasFeaturedProducts, 1500); setTimeout(fixPrivasFeaturedProducts, 3000); })(); /* ========================================================= PRIVAS - DYNAMIC HOME FEATURED TITLE يستبدل "Featured Pieces" الثابتة باسم الكتالوج الحقيقي ========================================================= */ (function () { function setupPrivasDynamicFeaturedTitle() { const path = window.location.pathname; const isHome = path === '/' || path === '/ar' || path === '/ar/' || path === '/en' || path === '/en/'; if (!isHome) return; document.body.classList.add('privas-home-page'); const allTitles = Array.from( document.querySelectorAll('h1, h2, h3, .s-block__title, .section-title, .home-title') ); const featuredTitle = allTitles.find((el) => { const text = (el.textContent || '').trim().toLowerCase(); return text === 'featured pieces' || text.includes('featured pieces'); }); if (!featuredTitle) return; featuredTitle.classList.add('privas-main-featured-title'); // نبحث عن عنوان القسم الحقيقي القريب من المنتجات let realCatalogTitle = null; // 1) نبحث في الإخوة والعناصر القريبة const nearbyScope = featuredTitle.closest('section, .s-block, .container, div') || document.body; const nearbyTitles = Array.from( nearbyScope.querySelectorAll('h1, h2, h3, .s-block__title, .section-title, .home-title') ).filter((el) => el !== featuredTitle); realCatalogTitle = nearbyTitles.find((el) => { const text = (el.textContent || '').trim(); if (!text) return false; const lower = text.toLowerCase(); if (lower.includes('featured pieces')) return false; // نستبعد العناوين العامة المعروفة const excluded = [ 'timeless style', 'curated collections', 'luxury pieces', 'elegance in every detail' ]; if (excluded.includes(lower)) return false; // عنوان قصير ومعقول مثل "قطع مختارة" return text.length <= 40; }); // 2) إذا لم نجده، نبحث قرب أول قائمة منتجات في الصفحة الرئيسية if (!realCatalogTitle) { const firstProductsArea = document.querySelector('.privas-featured-section-fixed') || document.querySelector('.privas-featured-cards-row') || document.querySelector('.s-products-list-wrapper') || document.querySelector('.s-products-list'); if (firstProductsArea) { let node = firstProductsArea; for (let i = 0; i < 6 && node; i++) { const titles = Array.from( node.querySelectorAll('h1, h2, h3, .s-block__title, .section-title, .home-title') ).filter((el) => el !== featuredTitle); const found = titles.find((el) => { const text = (el.textContent || '').trim(); if (!text) return false; const lower = text.toLowerCase(); return !lower.includes('featured pieces') && text.length <= 40; }); if (found) { realCatalogTitle = found; break; } node = node.parentElement; } } } if (!realCatalogTitle) return; const cleanText = (realCatalogTitle.textContent || '').trim(); if (!cleanText) return; // استبدال العنوان الثابت featuredTitle.textContent = cleanText; featuredTitle.classList.add('privas-title-replaced'); // إخفاء العنوان المكرر الأصلي realCatalogTitle.classList.add('privas-hide-duplicate-featured-title'); } document.addEventListener('DOMContentLoaded', setupPrivasDynamicFeaturedTitle); window.addEventListener('load', setupPrivasDynamicFeaturedTitle); setTimeout(setupPrivasDynamicFeaturedTitle, 700); setTimeout(setupPrivasDynamicFeaturedTitle, 1500); setTimeout(setupPrivasDynamicFeaturedTitle, 2500); })(); /* ========================================================= PRIVAS - ENSURE FEATURED TITLE SPAN ضمان ظهور خطين العنوان على الويب والموبايل ========================================================= */ (function () { function wrapPrivasFeaturedTitle() { const title = document.querySelector('.privas-main-featured-title'); if (!title) return; if (!title.querySelector('span')) { const text = title.textContent.trim(); if (text) { title.innerHTML = '' + text + ''; } } } document.addEventListener('DOMContentLoaded', wrapPrivasFeaturedTitle); window.addEventListener('load', wrapPrivasFeaturedTitle); setTimeout(wrapPrivasFeaturedTitle, 500); setTimeout(wrapPrivasFeaturedTitle, 1500); setTimeout(wrapPrivasFeaturedTitle, 3000); })(); /* ========================================================= PRIVAS - REMOVE EXTRA OUTER FEATURED TITLE LINES يخفي الخطوط الخارجية الزائدة حول عنوان قطع مختارة ========================================================= */ (function () { function cleanPrivasFeaturedTitleLines() { const title = document.querySelector('.privas-main-featured-title'); if (!title) return; // ضمان وجود span حول النص if (!title.querySelector('span')) { const text = title.textContent.trim(); if (text) { title.innerHTML = '' + text + ''; } } const parent = title.parentElement; if (!parent) return; parent.classList.add('privas-featured-title-clean-parent'); // إخفاء أي عناصر فارغة حول العنوان تشكل الخطوط الخارجية Array.from(parent.children).forEach(function (el) { if (el === title) return; const text = (el.textContent || '').trim(); const rect = el.getBoundingClientRect(); const style = window.getComputedStyle(el); const looksLikeLine = !text && rect.width > 40 && rect.height <= 8; const hasLineBorder = !text && ( style.borderTopWidth !== '0px' || style.borderBottomWidth !== '0px' ); if (looksLikeLine || hasLineBorder) { el.classList.add('privas-hide-extra-featured-line'); } }); } document.addEventListener('DOMContentLoaded', cleanPrivasFeaturedTitleLines); window.addEventListener('load', cleanPrivasFeaturedTitleLines); setTimeout(cleanPrivasFeaturedTitleLines, 500); setTimeout(cleanPrivasFeaturedTitleLines, 1500); setTimeout(cleanPrivasFeaturedTitleLines, 3000); })(); document.addEventListener('DOMContentLoaded', function () { setTimeout(function () { const title = document.querySelector('.privas-main-featured-title'); if (!title || title.querySelector('span')) return; const text = title.textContent.trim(); if (!text) return; title.innerHTML = '' + text + ''; }, 800); }); /* ========================================================= PRIVAS - REBUILD FEATURED TITLE CLEAN إخفاء عنوان قطع مختارة القديم وإنشاء عنوان فاخر جديد ========================================================= */ (function () { function rebuildPrivasFeaturedTitle() { const path = window.location.pathname; const isHome = path === '/' || path === '/ar' || path === '/ar/' || path === '/en' || path === '/en/'; if (!isHome) return; document.body.classList.add('privas-home-page'); const cardsRow = document.querySelector('.privas-featured-cards-row'); if (!cardsRow) return; if (document.querySelector('.privas-clean-featured-title')) return; let oldTitle = document.querySelector('.privas-main-featured-title') || Array.from(document.querySelectorAll('h1, h2, h3, .s-block__title, .section-title')).find(function (el) { const text = (el.textContent || '').trim(); return text.includes('قطع مختارة') || text.toLowerCase().includes('featured pieces'); }); let titleText = 'قطع مختارة'; if (oldTitle) { const oldText = (oldTitle.textContent || '').trim(); if (oldText && !oldText.toLowerCase().includes('featured pieces')) { titleText = oldText; } const oldParent = oldTitle.parentElement; oldTitle.classList.add('privas-hide-old-featured-title'); if (oldParent) { oldParent.classList.add('privas-hide-old-featured-title-parent'); Array.from(oldParent.children).forEach(function (child) { const text = (child.textContent || '').trim(); const rect = child.getBoundingClientRect(); if (child !== oldTitle && !text && rect.height <= 12) { child.classList.add('privas-hide-old-featured-line'); } }); } } const newTitle = document.createElement('div'); newTitle.className = 'privas-clean-featured-title'; newTitle.innerHTML = '' + titleText + ''; cardsRow.insertAdjacentElement('beforebegin', newTitle); } document.addEventListener('DOMContentLoaded', rebuildPrivasFeaturedTitle); window.addEventListener('load', rebuildPrivasFeaturedTitle); setTimeout(rebuildPrivasFeaturedTitle, 500); setTimeout(rebuildPrivasFeaturedTitle, 1500); setTimeout(rebuildPrivasFeaturedTitle, 3000); })(); /* ========================================================= PRIVAS - MARK PRODUCT PAGES ONLY يضيف كلاس لصفحة المنتج فقط ========================================================= */ (function () { function markPrivasProductPage() { const path = window.location.pathname; const isProductPage = document.querySelector('salla-product-options') || document.querySelector('salla-add-product-button') || document.querySelector('.s-product-single') || path.includes('/p'); const isCategoryPage = path.includes('/c') || path.includes('/عبايات') || path.includes('/شنط'); if (isProductPage && !isCategoryPage) { document.body.classList.add('privas-product-page'); } } document.addEventListener('DOMContentLoaded', markPrivasProductPage); window.addEventListener('load', markPrivasProductPage); setTimeout(markPrivasProductPage, 700); setTimeout(markPrivasProductPage, 1500); })(); /* ========================================================= PRIVAS - GALLERY FRAME BACKGROUND ZOOM زووم مباشر على إطار صورة المنتج بدون الضغط عليها ========================================================= */ (function () { if (window.innerWidth <= 767) return; function isProductPage() { return ( window.location.pathname.includes('/p') || document.querySelector('salla-add-product-button') || document.querySelector('salla-product-options') ); } if (!isProductPage()) return; var zoomValue = 2.9; var activeFrame = null; var originalFrameBg = null; function getVisibleImgFromFrame(frame) { if (!frame) return null; var imgs = Array.from(frame.querySelectorAll('img')).filter(function (img) { var rect = img.getBoundingClientRect(); var src = img.currentSrc || img.src || ''; return ( src && rect.width > 120 && rect.height > 160 && rect.bottom > 0 && rect.top < window.innerHeight ); }); if (!imgs.length) return null; imgs.sort(function (a, b) { var ra = a.getBoundingClientRect(); var rb = b.getBoundingClientRect(); return (rb.width * rb.height) - (ra.width * ra.height); }); return imgs[0]; } function extractBgUrl(el) { if (!el) return ''; var bg = window.getComputedStyle(el).backgroundImage; if (!bg || bg === 'none') return ''; var match = bg.match(/url\(["']?(.*?)["']?\)/); return match && match[1] ? match[1] : ''; } function getMainGalleryFrame() { var candidates = Array.from(document.querySelectorAll( '.s-product-single-gallery, .product-gallery, [class*="gallery"], .swiper, .swiper-wrapper, .swiper-slide' )).filter(function (el) { var rect = el.getBoundingClientRect(); if ( rect.width < 260 || rect.height < 320 || rect.bottom < 0 || rect.top > window.innerHeight ) { return false; } if ( el.closest('header') || el.closest('#mainnav') || el.closest('.s-product-card-entry') || el.closest('.swiper-thumbs') || el.closest('[class*="thumb"]') || el.closest('[class*="thumbnail"]') ) { return false; } var hasImg = getVisibleImgFromFrame(el); var hasBg = extractBgUrl(el); return hasImg || hasBg; }); if (!candidates.length) return null; candidates.sort(function (a, b) { var ra = a.getBoundingClientRect(); var rb = b.getBoundingClientRect(); return (rb.width * rb.height) - (ra.width * ra.height); }); return candidates[0]; } function getImageUrl(frame) { var img = getVisibleImgFromFrame(frame); if (img) { return img.currentSrc || img.src || ''; } return extractBgUrl(frame); } function resetZoom() { if (!activeFrame) return; activeFrame.style.backgroundImage = originalFrameBg || ''; activeFrame.style.backgroundSize = ''; activeFrame.style.backgroundPosition = ''; activeFrame.style.backgroundRepeat = ''; activeFrame.style.cursor = ''; activeFrame.classList.remove('privas-frame-zooming'); var imgs = activeFrame.querySelectorAll('img'); imgs.forEach(function (img) { img.style.opacity = ''; }); activeFrame = null; originalFrameBg = null; } document.addEventListener('mousemove', function (e) { var frame = getMainGalleryFrame(); if (!frame) { resetZoom(); return; } var rect = frame.getBoundingClientRect(); var inside = e.clientX >= rect.left && e.clientX <= rect.right && e.clientY >= rect.top && e.clientY <= rect.bottom; if (!inside) { resetZoom(); return; } var imgUrl = getImageUrl(frame); if (!imgUrl) { resetZoom(); return; } if (activeFrame !== frame) { resetZoom(); activeFrame = frame; originalFrameBg = frame.style.backgroundImage || ''; } var x = ((e.clientX - rect.left) / rect.width) * 100; var y = ((e.clientY - rect.top) / rect.height) * 100; frame.classList.add('privas-frame-zooming'); frame.style.cursor = 'zoom-in'; frame.style.backgroundImage = 'url("' + imgUrl + '")'; frame.style.backgroundRepeat = 'no-repeat'; frame.style.backgroundSize = (rect.width * zoomValue) + 'px ' + (rect.height * zoomValue) + 'px'; frame.style.backgroundPosition = x + '% ' + y + '%'; var imgs = frame.querySelectorAll('img'); imgs.forEach(function (img) { img.style.opacity = '0'; }); }, true); document.addEventListener('mouseleave', resetZoom, true); window.addEventListener('scroll', resetZoom, true); window.addEventListener('blur', resetZoom); document.addEventListener('click', function () { resetZoom(); }, true); })(); /* ========================================================= PRIVAS - Curated Look Section - Clean Version قسم تنسيق العباية والحقيبة - نسخة نظيفة من الصفر ========================================================= */ (function () { function addPrivasCuratedLookClean() { const path = window.location.pathname.replace(/\/$/, ""); const isHome = path === "" || path === "/" || path === "/ar" || path === "/en"; if (!isHome) return; if (document.querySelector(".privas-look-clean")) return; const data = { imageUrl: "https://cdn.salla.sa/zvPBPp/products/E8zkF6igf18NzuziDcl1orNBTc8jrnuxa2GVk0LG.png", eyebrow: "تناغم العباية مع الحقيبة", title: "أناقتكِ... بتفاصيل تُشبهكِ", description: "في PRIVAS، نؤمن أن الجمال يكمن في التفاصيل. مجموعة مختارة بعناية تجمع بين فخامة العباية ورقي الحقيبة، لترافقكِ في كل لحظة بأناقة لا تُنسى.", points: [ { icon: "✦", text: "حرفية عالية في كل خياطة وتفصيلة." }, { icon: "◇", text: "تناغم مثالي بين العباية والحقيبة." }, { icon: "◌", text: "تنسيقات مختارة بعناية تليق بأسلوبكِ." }, { icon: "♢", text: "تصاميم حصرية بكميات محدودة." }, { icon: "♕", text: "أناقة خالدة تُعبّر عن ذوقكِ الرفيع." } ], bagsUrl: "/ar/womens-bags/c2056306913", abayasUrl: "/ar/عبايات/c815517504", bagsButton: "استكشفي الحقائب", abayasButton: "استكشفي العبايات" }; const section = document.createElement("section"); section.className = "privas-look-clean"; section.innerHTML = `
تنسيق عباية وحقيبة من PRIVAS
${data.eyebrow}

${data.title}

${data.description}

${data.points .map(function (item) { return `
${item.icon}

${item.text}

`; }) .join("")}
${data.bagsButton} ${data.abayasButton}
`; /* ========================================================= PRIVAS - PLACE LOOK CLEAN SECTION AFTER MAIN HERO وضع القسم بعد البانر الرئيسي مباشرة ========================================================= */ const heroImageUrl = "nebbMbS9yLYNAvYwV276vAEth7njml2LNFSIdXkc"; let heroBlock = null; /* نبحث عن البانر الرئيسي حسب صورة الهيرو */ const heroImg = Array.from(document.querySelectorAll("img")).find(function (img) { return (img.src || "").includes(heroImageUrl); }); if (heroImg) { heroBlock = heroImg.closest("section") || heroImg.closest(".s-block") || heroImg.closest(".container") || heroImg.parentElement; } /* لو الهيرو معمول كخلفية وليس img */ if (!heroBlock) { const allEls = Array.from(document.querySelectorAll("section, div")); heroBlock = allEls.find(function (el) { const bg = window.getComputedStyle(el).backgroundImage || ""; return bg.includes(heroImageUrl); }); } /* نضع القسم بعد الهيرو */ if (heroBlock && heroBlock.parentNode) { heroBlock.insertAdjacentElement("afterend", section); return; } /* بديل: قبل قسم القيم */ const valuesBlock = Array.from(document.querySelectorAll("section, div")).find(function (el) { const text = (el.textContent || "").trim(); return ( text.includes("Timeless Style") || text.includes("Curated Collections") || text.includes("Luxury Pieces") ); }); if (valuesBlock && valuesBlock.parentNode) { valuesBlock.insertAdjacentElement("beforebegin", section); return; } /* بديل آخر: قبل المنتجات */ const productBlock = document.querySelector("salla-products-list") || document.querySelector(".s-products-list-wrapper") || document.querySelector(".products-container") || document.querySelector(".s-block"); if (productBlock) { const block = productBlock.closest("section") || productBlock.closest(".s-block") || productBlock.parentElement; if (block && block.parentNode) { block.insertAdjacentElement("beforebegin", section); return; } } /* آخر حل: قبل الفوتر */ const footer = document.querySelector("footer"); if (footer && footer.parentNode) { footer.parentNode.insertBefore(section, footer); } else { document.body.appendChild(section); } } document.addEventListener("DOMContentLoaded", addPrivasCuratedLookClean); window.addEventListener("load", addPrivasCuratedLookClean); setTimeout(addPrivasCuratedLookClean, 700); setTimeout(addPrivasCuratedLookClean, 1500); setTimeout(addPrivasCuratedLookClean, 3000); })(); /* ========================================================= PRIVAS - DESKTOP ONLY SIMPLE LOOK BANNER صورة كاملة داخل إطار بحجمها الصحيح + زرين فقط بدون التأثير على الموبايل ========================================================= */ (function () { function privasDesktopSimpleLookBanner() { if (window.innerWidth < 1025) return; var section = document.querySelector(".privas-look-clean"); if (!section) return; var media = section.querySelector(".privas-look-clean__media"); var img = section.querySelector(".privas-look-clean__img"); var content = section.querySelector(".privas-look-clean__content"); if (!media || !img || !content) return; /* الإطار العام مثل البانر */ section.style.setProperty("width", "min(1140px, calc(100vw - 120px))", "important"); section.style.setProperty("max-width", "1140px", "important"); section.style.setProperty("margin", "48px auto 75px", "important"); section.style.setProperty("padding", "0", "important"); section.style.setProperty("position", "relative", "important"); section.style.setProperty("display", "block", "important"); section.style.setProperty("overflow", "hidden", "important"); section.style.setProperty("background", "#f8f2ec", "important"); section.style.setProperty("direction", "rtl", "important"); section.style.setProperty("left", "auto", "important"); section.style.setProperty("right", "auto", "important"); section.style.setProperty("transform", "none", "important"); /* ضبط ارتفاع البانر حسب أبعاد الصورة الأصلية */ function setBannerHeightByImage() { var sectionWidth = section.getBoundingClientRect().width || 1140; if (img.naturalWidth && img.naturalHeight) { var imageRatio = img.naturalWidth / img.naturalHeight; var calculatedHeight = sectionWidth / imageRatio; section.style.setProperty("height", calculatedHeight + "px", "important"); section.style.setProperty("min-height", calculatedHeight + "px", "important"); } else { section.style.setProperty("height", "600px", "important"); section.style.setProperty("min-height", "600px", "important"); } } if (img.complete) { setBannerHeightByImage(); } else { img.onload = setBannerHeightByImage; } /* الصورة داخل الإطار */ media.style.setProperty("position", "absolute", "important"); media.style.setProperty("inset", "0", "important"); media.style.setProperty("width", "100%", "important"); media.style.setProperty("height", "100%", "important"); media.style.setProperty("display", "block", "important"); media.style.setProperty("overflow", "hidden", "important"); media.style.setProperty("z-index", "1", "important"); media.style.setProperty("margin", "0", "important"); media.style.setProperty("padding", "0", "important"); media.style.setProperty("background", "#f8f2ec", "important"); img.style.setProperty("position", "absolute", "important"); img.style.setProperty("inset", "0", "important"); img.style.setProperty("width", "100%", "important"); img.style.setProperty("height", "100%", "important"); img.style.setProperty("max-width", "none", "important"); img.style.setProperty("display", "block", "important"); /* مهم: الصورة كاملة بدون قص وبدون تمدد */ img.style.setProperty("object-fit", "contain", "important"); img.style.setProperty("object-position", "center center", "important"); img.style.setProperty("margin", "0", "important"); img.style.setProperty("padding", "0", "important"); /* استبدال المحتوى كله بزرين فقط */ content.innerHTML = `
اكتشفي العبايات اكتشفي الحقائب
`; content.style.setProperty("position", "absolute", "important"); content.style.setProperty("inset", "0", "important"); content.style.setProperty("width", "100%", "important"); content.style.setProperty("height", "100%", "important"); content.style.setProperty("z-index", "5", "important"); content.style.setProperty("display", "flex", "important"); content.style.setProperty("align-items", "flex-end", "important"); content.style.setProperty("justify-content", "center", "important"); content.style.setProperty("padding", "0 40px 48px", "important"); /* تدرج بيج خفيف أسفل البانر فقط */ content.style.setProperty( "background", "linear-gradient(180deg, rgba(248,242,236,0) 0%, rgba(248,242,236,0) 50%, rgba(248,242,236,0.24) 70%, rgba(248,242,236,0.72) 88%, rgba(248,242,236,0.92) 100%)", "important" ); content.style.setProperty("text-align", "center", "important"); content.style.setProperty("direction", "rtl", "important"); var actions = content.querySelector(".privas-simple-banner-actions"); var buttons = content.querySelectorAll(".privas-look-clean__btn"); if (actions) { actions.style.setProperty("display", "flex", "important"); actions.style.setProperty("flex-direction", "row", "important"); actions.style.setProperty("align-items", "center", "important"); actions.style.setProperty("justify-content", "center", "important"); actions.style.setProperty("gap", "18px", "important"); actions.style.setProperty("margin", "0", "important"); actions.style.setProperty("padding", "18px 26px", "important"); actions.style.setProperty("position", "relative", "important"); actions.style.setProperty("z-index", "6", "important"); actions.style.setProperty("border-radius", "999px", "important"); actions.style.setProperty( "background", "linear-gradient(90deg, rgba(248,242,236,0.08) 0%, rgba(248,242,236,0.72) 35%, rgba(248,242,236,0.86) 50%, rgba(248,242,236,0.72) 65%, rgba(248,242,236,0.08) 100%)", "important" ); actions.style.setProperty("backdrop-filter", "blur(5px)", "important"); actions.style.setProperty("-webkit-backdrop-filter", "blur(5px)", "important"); actions.style.setProperty("box-shadow", "0 18px 45px rgba(70, 38, 34, 0.10)", "important"); } buttons.forEach(function (btn) { btn.style.setProperty("min-width", "210px", "important"); btn.style.setProperty("height", "56px", "important"); btn.style.setProperty("padding", "0 30px", "important"); btn.style.setProperty("border-radius", "8px", "important"); btn.style.setProperty("display", "inline-flex", "important"); btn.style.setProperty("align-items", "center", "important"); btn.style.setProperty("justify-content", "center", "important"); btn.style.setProperty("text-decoration", "none", "important"); btn.style.setProperty("font-size", "16px", "important"); btn.style.setProperty("font-weight", "700", "important"); btn.style.setProperty("line-height", "1", "important"); btn.style.setProperty("transition", "all 0.25s ease", "important"); }); var solid = content.querySelector(".privas-look-clean__btn--solid"); var outline = content.querySelector(".privas-look-clean__btn--outline"); if (solid) { solid.style.setProperty("background", "#8f403b", "important"); solid.style.setProperty("color", "#fff", "important"); solid.style.setProperty("border", "1px solid #8f403b", "important"); solid.style.setProperty("box-shadow", "0 14px 30px rgba(80,36,32,0.18)", "important"); } if (outline) { outline.style.setProperty("background", "rgba(255,250,247,0.76)", "important"); outline.style.setProperty("color", "#7c453f", "important"); outline.style.setProperty("border", "1px solid rgba(124,69,63,0.65)", "important"); outline.style.setProperty("backdrop-filter", "blur(6px)", "important"); outline.style.setProperty("-webkit-backdrop-filter", "blur(6px)", "important"); } setBannerHeightByImage(); } document.addEventListener("DOMContentLoaded", privasDesktopSimpleLookBanner); window.addEventListener("load", privasDesktopSimpleLookBanner); window.addEventListener("resize", privasDesktopSimpleLookBanner); setTimeout(privasDesktopSimpleLookBanner, 500); setTimeout(privasDesktopSimpleLookBanner, 1500); setTimeout(privasDesktopSimpleLookBanner, 3000); })(); /* ========================================================= PRIVAS - FINAL HOMEPAGE ORDER ONLY ترتيب الصفحة الرئيسية فقط: Hero + 3 sections/cards + Look Banner + Featured Pieces بدون تغيير تصميم أي عنصر ========================================================= */ (function () { function orderPrivasHomepageSections() { var path = window.location.pathname.replace(/\/$/, ""); var isHome = path === "" || path === "/" || path === "/ar" || path === "/en"; if (!isHome) return; var homeSection = document.querySelector("#privas-editorial-home"); var lookBanner = document.querySelector(".privas-look-clean"); if (!homeSection || !lookBanner) return; /* نحدد عنوان قطع مختارة الموجود داخل قسم الهوم هذا هو أفضل مكان لإدخال بانر العبايات والحقائب قبله */ var featuredTitle = homeSection.querySelector(".privas-featured-title") || homeSection.querySelector(".privas-clean-featured-title") || Array.from(homeSection.querySelectorAll("h1, h2, h3, div")).find(function (el) { var text = (el.textContent || "").replace(/\s+/g, " ").trim(); return ( text.includes("قطع مختارة") || text.includes("Featured Pieces") || text.includes("Featured") ); }); /* إذا وجدنا عنوان قطع مختارة داخل قسم الهوم: نضع بانر العبايات والحقائب قبله مباشرة */ if (featuredTitle && featuredTitle.parentNode) { if (lookBanner.nextElementSibling !== featuredTitle) { featuredTitle.parentNode.insertBefore(lookBanner, featuredTitle); } return; } /* fallback: إذا لم نجد عنوان قطع مختارة داخل #privas-editorial-home نضع البانر بعد قسم القيم الثلاثة */ var valuesBlock = homeSection.querySelector(".privas-values"); if (valuesBlock && valuesBlock.parentNode) { valuesBlock.insertAdjacentElement("afterend", lookBanner); return; } /* fallback ثاني: نضعه بعد كروت الهوم الثلاثة */ var cardsBlock = homeSection.querySelector(".privas-editorial-cards"); if (cardsBlock && cardsBlock.parentNode) { cardsBlock.insertAdjacentElement("afterend", lookBanner); } } document.addEventListener("DOMContentLoaded", orderPrivasHomepageSections); window.addEventListener("load", orderPrivasHomepageSections); setTimeout(orderPrivasHomepageSections, 700); setTimeout(orderPrivasHomepageSections, 1500); setTimeout(orderPrivasHomepageSections, 3000); setTimeout(orderPrivasHomepageSections, 5000); })(); /* ========================================================= PRIVAS - MOBILE HERO IMAGE + TEXT CARD موبايل فقط: الصورة فوق + كارد النص تحتها بدون التأثير على الويب ========================================================= */ (function () { function privasMobileHeroCardStyle() { if (window.innerWidth > 767) return; var hero = document.querySelector(".privas-hero-editorial"); var overlay = document.querySelector(".privas-hero-overlay"); var content = document.querySelector(".privas-hero-content"); var logo = document.querySelector(".privas-logo-word"); var title = content ? content.querySelector("h1") : null; var text = content ? content.querySelector("p") : null; var btn = content ? content.querySelector(".privas-hero-btn") : null; if (!hero || !content) return; /* hero container */ hero.style.setProperty("width", "calc(100% - 28px)", "important"); hero.style.setProperty("margin", "28px auto 34px", "important"); hero.style.setProperty("position", "relative", "important"); hero.style.setProperty("display", "block", "important"); hero.style.setProperty("height", "auto", "important"); hero.style.setProperty("min-height", "0", "important"); hero.style.setProperty("padding", "0", "important"); hero.style.setProperty("overflow", "hidden", "important"); hero.style.setProperty("background-size", "100% auto", "important"); hero.style.setProperty("background-repeat", "no-repeat", "important"); hero.style.setProperty("background-position", "top center", "important"); hero.style.setProperty("background-color", "#f8f2ec", "important"); hero.style.setProperty("box-shadow", "0 18px 45px rgba(80,45,38,0.08)", "important"); if (overlay) { overlay.style.setProperty("display", "none", "important"); } /* نخلي مساحة للصورة فوق */ var spacer = hero.querySelector(".privas-mobile-hero-spacer"); if (!spacer) { spacer = document.createElement("div"); spacer.className = "privas-mobile-hero-spacer"; hero.insertBefore(spacer, content); } spacer.style.setProperty("display", "block", "important"); spacer.style.setProperty("width", "100%", "important"); spacer.style.setProperty("height", "0", "important"); spacer.style.setProperty("padding-top", "132%", "important"); /* text card */ content.style.setProperty("position", "relative", "important"); content.style.setProperty("inset", "auto", "important"); content.style.setProperty("top", "auto", "important"); content.style.setProperty("right", "auto", "important"); content.style.setProperty("bottom", "auto", "important"); content.style.setProperty("left", "auto", "important"); content.style.setProperty("width", "100%", "important"); content.style.setProperty("max-width", "100%", "important"); content.style.setProperty("margin", "0", "important"); content.style.setProperty("padding", "30px 22px 32px", "important"); content.style.setProperty("display", "flex", "important"); content.style.setProperty("flex-direction", "column", "important"); content.style.setProperty("align-items", "center", "important"); content.style.setProperty("justify-content", "center", "important"); content.style.setProperty("text-align", "center", "important"); content.style.setProperty("direction", "rtl", "important"); content.style.setProperty("background", "linear-gradient(180deg,#fbf6f1 0%,#f8f2ec 100%)", "important"); content.style.setProperty("transform", "none", "important"); if (logo) { logo.style.setProperty("width", "100%", "important"); logo.style.setProperty("margin", "0 0 12px", "important"); logo.style.setProperty("font-size", "28px", "important"); logo.style.setProperty("line-height", "1.1", "important"); logo.style.setProperty("letter-spacing", "8px", "important"); logo.style.setProperty("color", "#c79a8f", "important"); logo.style.setProperty("text-align", "center", "important"); logo.style.setProperty("opacity", "0.95", "important"); } if (title) { title.style.setProperty("width", "100%", "important"); title.style.setProperty("max-width", "100%", "important"); title.style.setProperty("margin", "0 0 16px", "important"); title.style.setProperty("font-size", "31px", "important"); title.style.setProperty("line-height", "1.22", "important"); title.style.setProperty("letter-spacing", "1px", "important"); title.style.setProperty("color", "#3b211c", "important"); title.style.setProperty("text-align", "center", "important"); } if (text) { text.style.setProperty("width", "100%", "important"); text.style.setProperty("max-width", "310px", "important"); text.style.setProperty("margin", "0 auto 22px", "important"); text.style.setProperty("font-size", "15px", "important"); text.style.setProperty("line-height", "1.9", "important"); text.style.setProperty("color", "#6a5148", "important"); text.style.setProperty("text-align", "center", "important"); text.style.setProperty("direction", "rtl", "important"); } if (btn) { btn.style.setProperty("min-width", "210px", "important"); btn.style.setProperty("height", "54px", "important"); btn.style.setProperty("margin", "0 auto", "important"); btn.style.setProperty("padding", "0 28px", "important"); btn.style.setProperty("display", "inline-flex", "important"); btn.style.setProperty("align-items", "center", "important"); btn.style.setProperty("justify-content", "center", "important"); btn.style.setProperty("border-radius", "12px", "important"); btn.style.setProperty("font-size", "15.5px", "important"); btn.style.setProperty("font-weight", "700", "important"); btn.style.setProperty("box-shadow", "0 14px 32px rgba(100,45,65,0.20)", "important"); } } document.addEventListener("DOMContentLoaded", privasMobileHeroCardStyle); window.addEventListener("load", privasMobileHeroCardStyle); window.addEventListener("resize", privasMobileHeroCardStyle); setTimeout(privasMobileHeroCardStyle, 500); setTimeout(privasMobileHeroCardStyle, 1500); setTimeout(privasMobileHeroCardStyle, 3000); })(); /* ========================================================= PRIVAS - MOBILE ONLY HERO IMAGE تغيير صورة البانر الرئيسي على الجوال فقط بدون تغيير الويب ========================================================= */ (function () { function changePrivasHeroImageMobileOnly() { if (window.innerWidth > 767) return; var hero = document.querySelector(".privas-hero-editorial"); if (!hero) return; var mobileHeroImage = "https://cdn.salla.sa/zvPBPp/products/QGsypYclAVjeW1bdQSws8J4UiKTGAIh1fdHrL7cD.png"; hero.style.setProperty( "background-image", 'url("' + mobileHeroImage + '")', "important" ); hero.style.setProperty("background-size", "cover", "important"); hero.style.setProperty("background-position", "center top", "important"); hero.style.setProperty("background-repeat", "no-repeat", "important"); } document.addEventListener("DOMContentLoaded", changePrivasHeroImageMobileOnly); window.addEventListener("load", changePrivasHeroImageMobileOnly); window.addEventListener("resize", changePrivasHeroImageMobileOnly); setTimeout(changePrivasHeroImageMobileOnly, 500); setTimeout(changePrivasHeroImageMobileOnly, 1500); setTimeout(changePrivasHeroImageMobileOnly, 3000); })(); /* ========================================================= PRIVAS - FORCE PRODUCT PRICE VISIBLE BY JS إظهار السعر داخل كروت المنتجات بالجافا ========================================================= */ (function () { function showPrivasProductPrices() { var cards = document.querySelectorAll("custom-salla-product-card"); cards.forEach(function (card) { var priceWrap = card.querySelector(".s-product-card-content-sub"); var salePrice = card.querySelector(".s-product-card-sale-price"); if (priceWrap) { priceWrap.style.setProperty("display", "flex", "important"); priceWrap.style.setProperty("visibility", "visible", "important"); priceWrap.style.setProperty("opacity", "1", "important"); priceWrap.style.setProperty("height", "auto", "important"); priceWrap.style.setProperty("min-height", "26px", "important"); priceWrap.style.setProperty("overflow", "visible", "important"); priceWrap.style.setProperty("justify-content", "center", "important"); priceWrap.style.setProperty("align-items", "center", "important"); priceWrap.style.setProperty("margin", "8px auto 10px", "important"); priceWrap.style.setProperty("order", "2", "important"); } if (salePrice) { salePrice.style.setProperty("display", "flex", "important"); salePrice.style.setProperty("visibility", "visible", "important"); salePrice.style.setProperty("opacity", "1", "important"); salePrice.style.setProperty("height", "auto", "important"); salePrice.style.setProperty("min-height", "24px", "important"); salePrice.style.setProperty("overflow", "visible", "important"); salePrice.style.setProperty("justify-content", "center", "important"); salePrice.style.setProperty("align-items", "center", "important"); salePrice.style.setProperty("gap", "8px", "important"); } var currentPrice = card.querySelector(".s-product-card-sale-price h4"); var oldPrice = card.querySelector(".s-product-card-sale-price span"); if (currentPrice) { currentPrice.style.setProperty("display", "inline-block", "important"); currentPrice.style.setProperty("visibility", "visible", "important"); currentPrice.style.setProperty("opacity", "1", "important"); currentPrice.style.setProperty("color", "#7b403b", "important"); currentPrice.style.setProperty("font-size", "15px", "important"); currentPrice.style.setProperty("font-weight", "800", "important"); currentPrice.style.setProperty("margin", "0", "important"); } if (oldPrice) { oldPrice.style.setProperty("display", "inline-block", "important"); oldPrice.style.setProperty("visibility", "visible", "important"); oldPrice.style.setProperty("opacity", "1", "important"); oldPrice.style.setProperty("color", "#b7a19a", "important"); oldPrice.style.setProperty("font-size", "12px", "important"); oldPrice.style.setProperty("text-decoration", "line-through", "important"); oldPrice.style.setProperty("margin", "0", "important"); } }); } document.addEventListener("DOMContentLoaded", showPrivasProductPrices); window.addEventListener("load", showPrivasProductPrices); setTimeout(showPrivasProductPrices, 500); setTimeout(showPrivasProductPrices, 1500); setTimeout(showPrivasProductPrices, 3000); setTimeout(showPrivasProductPrices, 5000); })(); /* ========================================================= PRIVAS HERO BUTTON LINK زر اكتشفي الكولكشن يفتح قسم الحقائب ========================================================= */ (function () { function privasHeroButtonToBags() { const bagsLink = 'https://privasline.com/ar/womens-bags/c2056306913'; document.querySelectorAll('a, button').forEach(function (el) { const text = el.textContent ? el.textContent.trim() : ''; if (text.includes('اكتشفي الكولكشن')) { if (el.tagName.toLowerCase() === 'a') { el.href = bagsLink; } else { el.onclick = function () { window.location.href = bagsLink; }; } el.style.cursor = 'pointer'; } }); } document.addEventListener('DOMContentLoaded', privasHeroButtonToBags); setTimeout(privasHeroButtonToBags, 800); setTimeout(privasHeroButtonToBags, 1800); })(); /* ========================================================= PRIVAS FEATURE CARDS - DISABLE LINKS إزالة روابط الكروت الثلاثة تحت الهيرو ========================================================= */ (function () { function disablePrivasFeatureCardLinks() { const cardTitles = [ 'Style Inspirations', 'Our Story', 'The First Collection' ]; document.querySelectorAll('a').forEach(function (link) { const text = link.textContent ? link.textContent.trim() : ''; const isPrivasFeatureCard = cardTitles.some(function (title) { return text.includes(title); }); if (isPrivasFeatureCard) { link.removeAttribute('href'); link.style.cursor = 'default'; link.setAttribute('aria-disabled', 'true'); link.addEventListener('click', function (e) { e.preventDefault(); e.stopPropagation(); }); } }); } document.addEventListener('DOMContentLoaded', disablePrivasFeatureCardLinks); setTimeout(disablePrivasFeatureCardLinks, 800); setTimeout(disablePrivasFeatureCardLinks, 1800); })();