document.addEventListener('DOMContentLoaded', function() { let logo = document.querySelector('.navbar-brand'); let footerBox = document.querySelector('footer > div.store-footer__inner > div > div.lg\\:col-span-2.rtl\\:lg\\:pl-20.ltr\\:lg\\:pr-20 a.flex.items-center.m-0'); if (logo && footerBox) { let h3 = footerBox.querySelector('a > h3'); if (h3) h3.style.fontSize = '0'; let clone = logo.cloneNode(true); footerBox.appendChild(clone); } console.log(logo); console.log(footerBox); }); document.querySelector("body > div.app-inner.flex.flex-col.min-h-full > header > div.main-nav-container.shadow-default.bg-white > div > div > div .flex.items-center.justify-end").innerHTML+= ` `; document.addEventListener('DOMContentLoaded', function() { if (document.body.classList.contains('product-single')) { const productBrand = document.querySelector('.product-brand'); const productTitle = document.querySelector('h1.text-xl.md\\:text-2xl.leading-10.font-bold.mb-6.text-gray-800'); const productPrice = document.querySelector('.flex.whitespace-nowrap.gap-4.items-center'); const sallaSlider = document.getElementById('details-slider-1687620094'); const sidebar = document.querySelector('.sidebar'); if (productBrand && productTitle && productPrice && sallaSlider && sidebar) { const titleAndBrandContainer = document.createElement('div'); titleAndBrandContainer.classList.add('flex', 'items-center', 'gap-x-3', 'mb-3'); productTitle.classList.remove('mb-6'); productBrand.classList.remove('mb-5'); titleAndBrandContainer.appendChild(productTitle); titleAndBrandContainer.appendChild(productBrand); const movedProductInfoWrapper = document.createElement('div'); movedProductInfoWrapper.classList.add('new-product-header-moved-content', 'bg-white', 'p-5', 'rounded-md', 'mb-5'); movedProductInfoWrapper.appendChild(titleAndBrandContainer); movedProductInfoWrapper.appendChild(productPrice); sidebar.insertBefore(movedProductInfoWrapper, sallaSlider); console.log('تم نقل عناصر العلامة التجارية، العنوان، والسعر بنجاح فوق سلايدر الصور وتنسيقها.'); } else { console.warn('لم يتم العثور على واحد أو أكثر من العناصر المطلوبة للنقل.'); } } }); document.addEventListener('DOMContentLoaded', function() { const socialMediaDiv = document.querySelector('.lg\\:hidden.contact-social'); const sallaAppsIcons = document.querySelector('salla-apps-icons'); const containerGrid = document.querySelector('.container.grid'); const originalParentOfSocialDiv = socialMediaDiv ? socialMediaDiv.parentElement : null; const originalNextSiblingOfSocialDiv = socialMediaDiv ? socialMediaDiv.nextElementSibling : null; if (!socialMediaDiv || !sallaAppsIcons || !containerGrid || !originalParentOfSocialDiv) { console.warn('لم يتم العثور على واحد أو أكثر من العناصر المطلوبة لنقل الـ social media div.'); return; } const mediaQuery = window.matchMedia('(max-width: 1023px)'); function handleMediaQueryChange(query) { if (query.matches) { if (socialMediaDiv.parentElement !== containerGrid || socialMediaDiv.nextElementSibling !== sallaAppsIcons) { containerGrid.insertBefore(socialMediaDiv, sallaAppsIcons); console.log('تم نقل قسم وسائل التواصل الاجتماعي إلى فوق أيقونات التطبيقات (للجوال).'); } } else { if (socialMediaDiv.parentElement !== originalParentOfSocialDiv) { if (originalNextSiblingOfSocialDiv) { originalParentOfSocialDiv.insertBefore(socialMediaDiv, originalNextSiblingOfSocialDiv); } else { originalParentOfSocialDiv.appendChild(socialMediaDiv); } console.log('تمت استعادة قسم وسائل التواصل الاجتماعي إلى موقعه الأصلي (لسطح المكتب).'); } } } handleMediaQueryChange(mediaQuery); mediaQuery.addEventListener('change', handleMediaQueryChange); }); (function() { function tryLoadMore() { try { const loadMoreButton = document.querySelector('div.s-infinite-scroll-wrapper > button'); if (loadMoreButton) { console.log('تم العثور على زر التحميل'); loadMoreButton.click(); console.log('تم الضغط على الزر'); } else { console.log('لم يتم العثور على زر التحميل'); } } catch (error) { console.error('حدث خطأ:', error); } } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', tryLoadMore); } else { tryLoadMore(); } setInterval(tryLoadMore, 3000); })();