Kin Nest KIN-018

👶 Set up your baby

Last Feed

—

Awake

—

Next Nap ~

—

Fussiness

—

0

Feeds

0

Naps

0h

Sleep

0

Diapers

Daily check

Log some data to see your daily check

Routine intelligence

Wake window—
Nap predictor—
Sleep debt today—
Avg feed interval—
Routine stability—

Log measurement

Growth history

No measurements logged yet.

Baby

Name

Date of birth

Night mode

Auto night mode

Dark interface 20:00 – 06:00

Export reminders

Remind me to export

Get reminded to back up your data

Data

KIN-018 · v1.1 · Kin Tools · by Alice and Darren

Log Feed

Log Diaper

`; const win = window.open('', '_blank'); if (win) { win.document.open(); win.document.write(html); win.document.close(); } else { // Popup blocked — fall back to blob download const blob = new Blob([html], { type: 'text/html' }); const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = todayFilename('html').replace('.html', '-report.html'); a.click(); } state.settings.remindLast = Date.now(); save(); renderSettings(); document.getElementById('remind-banner').classList.add('hidden'); } function importJSON(input) { const file = input.files[0]; if (!file) return; const reader = new FileReader(); reader.onload = e => { try { const data = JSON.parse(e.target.result); if (!data.feeds && !data.sleep) { showToast('Unrecognised file format'); return; } const count = (data.feeds||[]).length + (data.sleep||[]).length; confirm2('Import data?', `This will replace all existing data with ${count} imported entries. This cannot be undone.`, () => { const merged = { ...defaultState(), ...data }; state = merged; save(); render(); }); } catch { showToast('Invalid JSON file'); } }; reader.readAsText(file); input.value = ''; } function nukeAll() { confirm2('Delete all data?', 'All feeds, sleep, diaper logs and settings will be permanently erased. This cannot be undone.', () => { state = defaultState(); save(); render(); }); } // ═══════════════════════════════════════════════════════════ // Init // ═══════════════════════════════════════════════════════════ function init() { const params = new URLSearchParams(window.location.search); if (params.get('demo') === 'true') { isDemo = true; state = demoData(); document.getElementById('demoBar').style.display = 'flex'; } checkNightMode(); render(); // Long press: feed & diaper buttons setupLongPress('btn-feed', quickFeed, openFeedModal); setupLongPress('btn-diaper', quickDiaper, openDiaperModal); // Close overlays on backdrop ['ov-feed','ov-diaper'].forEach(id => { document.getElementById(id).addEventListener('click', e => { if (e.target.id === id) closeOv(id); }); }); document.getElementById('dlg-confirm').addEventListener('click', e => { if (e.target.id === 'dlg-confirm') closeOv('dlg-confirm'); }); // Live dashboard ticker dashTimer = setInterval(() => { if (document.getElementById('pane-today').classList.contains('active')) { renderDash(); renderTodayStats(); } }, 30000); // Night mode check every minute setInterval(checkNightMode, 60000); } init();