document.addEventListener('DOMContentLoaded', function () { // Select the
element inside the span with class "copyright-text" const copyrightText = document.querySelector('.copyright-text p.text-gray-400'); // Check if the element exists to avoid errors if (copyrightText) { // Update the inner HTML copyrightText.innerHTML = 'صنع بإتقان على | 2024 Crsshhh'; } }) document.addEventListener("DOMContentLoaded", function () { // Get the current page URL const currentURL = window.location.href; const targetURLs = [ "https://crsshhh.com/", "https://crsshhh.com/ar" ]; if (targetURLs.includes(currentURL)) { // Apply styles for .main-menu li > a const style = document.createElement("style"); style.innerHTML = ` .main-menu li > a { color: #58429B ; } .main-nav-container.fixed-pinned .main-menu > li > a { color: #58429B; } `; document.head.appendChild(style); } }); function addHoverAnimation() { // Select all sections with the 'products-item' class const sections = document.querySelectorAll('.products-item'); sections.forEach((section) => { // Add mouseenter event to apply the animation class section.addEventListener('mouseenter', () => { section.classList.add('zoom-out-animation'); }); // Add mouseleave event to remove the animation class section.addEventListener('mouseleave', () => { // Remove the animation class after animation ends setTimeout(() => { section.classList.remove('zoom-out-animation'); }, 300); }); }); } // Call the function to activate hover animations addHoverAnimation(); document.addEventListener("DOMContentLoaded", function() { // Function to update the WhatsApp message text function updateWhatsAppLink() { const whatsappLink = document.querySelector('.whatsapp-info'); if (whatsappLink) { const currentHref = whatsappLink.getAttribute('href'); if (currentHref.includes('Merhaba')) { const updatedHref = currentHref.replace('Merhaba', encodeURIComponent('السلام عليكم، أرغب في الاستفسار...')); whatsappLink.setAttribute('href', updatedHref); console.log('WhatsApp message text updated:', updatedHref); // Debugging } } } // Initial call to update the link updateWhatsAppLink(); // Optional: Monitor dynamic changes in the DOM const observer = new MutationObserver(updateWhatsAppLink); observer.observe(document.body, { childList: true, subtree: true }); }); document.addEventListener("DOMContentLoaded", function () { // Select the Login button const loginButton = document.querySelector('.header-btn[aria-label="user-icon"]'); // Check if the button exists if (loginButton) { const iconElement = document.createElement('i'); iconElement.className = 'sicon-user text-[var(--f-color)] text-2xl'; iconElement.setAttribute('aria-label', 'login-icon'); iconElement.style.cursor = 'pointer'; iconElement.onclick = loginButton.onclick; // Replace the hidden button with the icon loginButton.replaceWith(iconElement); } }); document.addEventListener("DOMContentLoaded", function () { // Select the specific footer section const footerSection = document.querySelector('footer.store-footer'); if (footerSection) { // Select the
element inside the slider-top-tag container const sliderParagraph = document.querySelector('.slider-top-tag p'); if (sliderParagraph) { // Change the font size to 14px sliderParagraph.style.fontSize = '14px'; } });