Focused Study & Learning Timer

Focused Study & Learning Timer

Structure your learning with timed intervals for maximum focus and retention.

Study Session

45:00
Ready to begin studying.

Session Goals

Completed Study Blocks

No study blocks completed yet.

Manage Study Goals

No study blocks completed yet.

`; return; } completedBlocksList.innerHTML = ''; completedBlocks.forEach(block => { const item = document.createElement('div'); item.className = 'p-3 bg-gray-100 rounded-lg text-sm'; item.innerHTML = `

Completed on ${block.date} - ${block.duration} minutes

Goals: ${block.goals.join(', ') || 'N/A'}

`; completedBlocksList.appendChild(item); }); } function downloadPDF() { if (completedBlocks.length === 0) { console.warn("No data to export."); return; } const { jsPDF } = window.jspdf; const doc = new jsPDF(); const tableData = completedBlocks.map(b => [b.date, `${b.duration} min`, b.goals.join('; ')]); doc.setFontSize(18); doc.text('Focused Study Log', 14, 22); doc.setFontSize(11); doc.setTextColor(100); doc.text(`Report as of: ${new Date().toLocaleDateString()}`, 14, 30); doc.autoTable({ head: [['Date & Time', 'Duration', 'Goals for the Session']], body: tableData, startY: 35, theme: 'grid', headStyles: { fillColor: [5, 150, 105] }, // Emerald-600 }); doc.save('Study-Log.pdf'); } // --- Event Listeners --- startPauseBtn.addEventListener('click', startPauseTimer); resetBtn.addEventListener('click', () => resetTimer(true)); studyDurationInput.addEventListener('change', () => resetTimer(true)); breakDurationInput.addEventListener('change', () => resetTimer(true)); addGoalBtn.addEventListener('click', addGoalForm); downloadPdfBtn.addEventListener('click', downloadPDF); // --- Initial Setup --- updateNavButtons(); resetTimer(); updateSessionGoals(); renderCompletedBlocks(); });
Scroll to Top