Most Common Bad Activities for Lack of Purpose

🌟 Most Common Bad Activities for Lack of Purpose

    ⭐ Your Favorites

      `); printWindow.document.close(); printWindow.print(); } // Function to clear favorites function clearFavorites() { favorites = []; localStorage.setItem('favorites', JSON.stringify(favorites)); renderFavorites(); } // Function to share data function shareData() { const shareModal = document.getElementById('shareModal'); const shareDataText = document.getElementById('shareDataText'); shareDataText.value = favorites.map(activity => ` ${activity.name}: - Why it's bad: ${activity.whyGood} - Statistic: ${activity.statistic} - Expert recommendation: ${activity.expertRecommendation} - Motivation: ${activity.motivation} - How to avoid it: ${activity.howTo} `).join('\n\n'); shareModal.style.display = 'flex'; } // Function to copy share data function copyShareData() { const shareDataText = document.getElementById('shareDataText'); shareDataText.select(); document.execCommand('copy'); alert("Data copied to clipboard!"); } // Function to share via email function shareViaEmail() { const shareDataText = document.getElementById('shareDataText'); const subject = "My Favorite Activities for Lack of Purpose"; const body = encodeURIComponent(shareDataText.value); window.location.href = `mailto:?subject=${subject}&body=${body}`; } // Function to share via WhatsApp function shareViaWhatsApp() { const shareDataText = document.getElementById('shareDataText'); const text = encodeURIComponent(shareDataText.value); window.open(`https://wa.me/?text=${text}`, '_blank'); } // Function to close the modal function closeModal() { const shareModal = document.getElementById('shareModal'); shareModal.style.display = 'none'; } // Call renderActivities and renderFavorites on page load renderActivities(); renderFavorites();