/* Add custom Js styles below */ // ✅ Pages where changes should apply const pagesToHide = [ 'page-543380744', // من نحن 'page-197762997', // الخصوصية و شروط الاستخدام 'page-445810621', // الأسئلة الشائعة 'page-22609072', // الشهادة الضريبية 'page-270656696' // سياسة الشحن والاستبدال ]; // Function to check if current page is in target list function isTargetPage() { const path = window.location.pathname; return pagesToHide.some(page => path.endsWith(page)); } // Function to remove "-App" const cleanText = txt => txt.replace(/-App\s*/g, '').trim(); // Main logic if (isTargetPage()) { // Hide header & footer document.querySelector('header')?.style.setProperty('display', 'none', 'important'); document.querySelector('footer')?.style.setProperty('display', 'none', 'important'); // Hide Salla ad & breadcrumbs document.querySelector('salla-advertisement')?.style.setProperty('display', 'none', 'important'); document.querySelector('nav.breadcrumbs')?.style.setProperty('display', 'none', 'important'); // 🆕 Hide custom store menu document.querySelector('.almajed-custom-store-menu')?.style.setProperty('display', 'none', 'important'); // Clean breadcrumbs text document.querySelectorAll('.s-breadcrumb-item').forEach(el => { el.textContent = cleanText(el.textContent); }); // Clean H1 title const h1 = document.querySelector('h1'); if (h1) h1.textContent = cleanText(h1.textContent); // Clean in head document.title = cleanText(document.title); }