document.addEventListener('DOMContentLoaded', () => { const textsList = document.getElementById('texts-list'); async function loadTexts() { const response = await fetch('/api/texts'); const texts = await response.json(); textsList.innerHTML = texts .map(text => '