Pocket Recovery Tool

🌙

Sobriety Timer

0d 0h 0m 0s

Journal

Daily Reminder Tracker

Bible Verse

Click to generate

Word of the Day

Click to generate

Inspiration

Click to generate
t> >istory')||"[]"); function displayHistory(){ const historyEl=document.getElementById('journalHistory'); historyEl.innerHTML=""; journalHistory.slice().reverse().forEach(entry=>{ const div=document.createElement('div'); div.classList.add('journal-entry'); div.innerHTML=`${entry.date}${entry.text}`; historyEl.appendChild(div); }); } displayHistory(); function saveJournal(){ if(!journalEl.value.trim()){ alert("Please write something before saving."); return; } journalHistory.push({text:journalEl.value,date:new Date().toLocaleString()}); localStorage.setItem('journalHistory',JSON.stringify(journalHistory)); journalEl.value=""; displayHistory(); alert("Your journal entry has been saved!"); } // Share Progress const gratitudeQuotes=["I am grateful for my progress.","Today I choose positivity.","Small steps lead to big victories.","I celebrate each sober day.","Gratitude is my daily practice."]; function shareProgress(){ const years = document.getElementById('years').textContent; const months = document.getElementById('months').textContent; const days = document.getElementById('days').textContent; const quote = gratitudeQuotes[Math.floor(Math.random()*gratitudeQuotes.length)]; const shareText=`I have ${years} ${months} ${days} of sobriety!\n${quote}\nCheck out my progress: ${window.location.href}`; navigator.clipboard.writeText(shareText).then(()=>alert("Progress copied to clipboard!")); } // Confetti function launchConfetti(){ const container=document.getElementById('confettiContainer'); for(let i=0;i<150;i++){ const conf=document.createElement('div'); conf.classList.add('confetti-piece'); conf.style.left=Math.random()*100+'%'; conf.style.animationDuration=(2+Math.random()*2)+'s'; container.appendChild(conf); setTimeout(()=>conf.remove(),4000); } }