/* ========== START OF SNOW EFFECT ========== */ /*function addSnowflakes() { const snowflakesContainer = document.createElement('div'); snowflakesContainer.className = 'snowflakes'; for (let i = 0; i < 24; i++) { const snowflake = document.createElement('div'); snowflake.className = 'snowflake'; snowflake.innerHTML = '❅'; snowflakesContainer.appendChild(snowflake); } document.body.appendChild(snowflakesContainer); return snowflakesContainer; } function removeSnowflakes(container) { if (container && container.parentNode) { container.parentNode.removeChild(container); } } const snowflakesContainer = addSnowflakes(); // Set a timeout to remove the snowflakes after 10 seconds (adjust as needed) setTimeout(() => { removeSnowflakes(snowflakesContainer); }, 30000); */ /* ================================ */ const arabicNavigationHTML = ` `; const englishNavigationHTML = ` `; if (window.location.pathname.includes('/ar') || window.location.search.includes('lang=ar')) { insertNavigation(arabicNavigationHTML); console.log("1"); } else if (window.location.pathname.includes('/en') || window.location.search.includes('lang=en')) { insertNavigation(englishNavigationHTML); console.log("2"); } else { insertNavigation(englishNavigationHTML); console.log("3"); } function insertNavigation(navigationHTML) { const appElement = document.getElementById('app'); const headerComponentsElementMobil = appElement.querySelector('.index .store-header'); const headerComponentsElementDisckTop = appElement.querySelector('.index .store-header .right-side > .justify-start'); const navigationContainer = document.createElement('div'); navigationContainer.innerHTML = navigationHTML; const navigationCopy = navigationContainer.cloneNode(true); headerComponentsElementMobil.appendChild(navigationContainer); headerComponentsElementDisckTop.appendChild(navigationCopy); } /* ================================================ */