(async () => { try { const res = await fetch('/api/github-updates'); const { updates } = await res.json(); const u = updates[0]; const commitUrl = `https://github.com/xojw/waves/commit/${u.sha}`; document.getElementById('last-updated').innerHTML = ` Last updated ${u.ago} ~ ${u.sha} (Github)`; } catch { document.getElementById('last-update').textContent = 'Failed to load last update'; } })();