WriteWise – Offline AI Writing Assistant
Writing Stats
Words: 0
Characters (w/ spaces): 0
Characters (w/o spaces): 0
Sentences: 0
Paragraphs: 0
Reading Time: 0 min
Flesch-Kincaid Ease: 0 (N/A)
Flesch-Kincaid Grade: 0
Productivity
Timer: 25:00
Last Edited: N/A
Your data never leaves your browser.
`).join(''); } // Synonym Suggestions editor.addEventListener('mouseover', (e) => { if (e.target.tagName === 'SPAN' && thesaurus[e.target.textContent.toLowerCase()]) { const synonyms = thesaurus[e.target.textContent.toLowerCase()]; e.target.title = `Synonyms: ${synonyms.join(', ')}`; } }); // Productivity Tools let focusMode = false; function toggleFocusMode() { focusMode = !focusMode; document.body.classList.toggle('focus-mode', focusMode); } let pomodoroInterval; function startPomodoro() { let time = 25 * 60; clearInterval(pomodoroInterval); pomodoroInterval = setInterval(() => { time--; document.getElementById('pomodoroTimer').textContent = `${Math.floor(time / 60)}:${(time % 60).toString().padStart(2, '0')}`; if (time <= 0) { clearInterval(pomodoroInterval); alert('Pomodoro session complete! Take a 5-minute break.'); } }, 1000); } function updateGoalProgress() { const goal = parseInt(document.getElementById('goalInput').value) || 500; const words = (editor.textContent.match(/\b\w+\b/g) || []).length; const progress = Math.min((words / goal) * 100, 100); document.getElementById('goalProgress').style.width = `${progress}%`; } function updateLastEdited() { const now = new Date().toLocaleString(); document.getElementById('lastEdited').textContent = now; localStorage.setItem('writewise-last-edited', now); } if (localStorage.getItem('writewise-last-edited')) { document.getElementById('lastEdited').textContent = localStorage.getItem('writewise-last-edited'); } function saveVersion() { history.push({ content: editor.innerHTML, timestamp: new Date().toLocaleString() }); if (history.length > 10) history.shift(); // Limit history historyIndex = history.length - 1; localStorage.setItem('writewise-history', JSON.stringify(history)); } function showVersionHistory() { const versions = history.map((v, i) => `