WriteWise – Offline AI Writing Assistant – TrendsGlide

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

Grammar & Style

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) => `
${v.timestamp}
`).join(''); document.getElementById('suggestions').innerHTML = versions; } function restoreVersion(index) { editor.innerHTML = history[index].content; historyIndex = index; overrideWordCount(); } // Undo/Redo document.addEventListener('keydown', (e) => { if (e.ctrlKey && e.key === 'z' && historyIndex > 0) { editor.innerHTML = history[--historyIndex].content; overrideWordCount(); } if (e.ctrlKey && e.key === 'y' && historyIndex < history.length - 1) { editor.innerHTML = history[++historyIndex].content; overrideWordCount(); } if (e.ctrlKey && e.key === 'b') formatText('bold'); if (e.ctrlKey && e.key === 'i') formatText('italic'); }); // Export Functions function exportFile(type) { const content = editor.textContent; let blob, filename; if (type === 'txt') { blob = new Blob([content], { type: 'text/plain' }); filename = 'writing.txt'; } else if (type === 'md') { blob = new Blob([content], { type: 'text/markdown' }); filename = 'writing.md'; } else if (type === 'pdf') { const { jsPDF } = window.jspdf; const doc = new jsPDF(); doc.text(content, 10, 10); doc.save('writing.pdf'); return; } const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; a.click(); URL.revokeObjectURL(url); } // Data Reset function resetData() { if (confirm('Are you sure you want to reset all data?')) { localStorage.clear(); editor.innerHTML = ''; history = []; historyIndex = -1; overrideWordCount(); updateLastEdited(); } } // Popup Functions function openPopup(title) { let message = ''; switch (title) { case 'Home': message = 'Welcome to WriteWise! A 100% offline, privacy-focused writing assistant.'; break; case 'About': message = 'WriteWise is designed for writers who value privacy and simplicity with rule-based tools.'; break; case 'Features': message = 'Includes grammar checks, readability scores, productivity tools, and offline functionality.'; break; case 'Contact': message = 'For inquiries, visit our website (offline demo only).'; break; case 'Privacy Policy': message = 'Your data never leaves your browser. All processing is done locally.'; break; case 'Terms of Service': message = 'By using WriteWise, you agree to our offline terms and conditions.'; break; case 'Contact Us': message = 'This is an offline demo. Contact us via our website for support.'; break; } document.getElementById('popupTitle').textContent = title; document.getElementById('popupMessage').textContent = message; document.getElementById('popup').style.display = 'block'; document.getElementById('popupOverlay').style.display = 'block'; } function closePopup() { document.getElementById('popup').style.display = 'none'; document.getElementById('popupOverlay').style.display = 'none'; } // Event Listeners editor.addEventListener('input', overrideWordCount); overrideWordCount();

Scroll to Top