Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.com.git
document.getElementById('current-year').textContent = new Date().getFullYear();

fetch('downloads/version.txt')
  .then(r => r.text())
  .then(v => document.getElementById('version').textContent = v.trim());

Promise.all([
  'KeenWrite.exe-count.txt',
  'keenwrite.app-count.txt',
  'keenwrite.jar-count.txt',
  'keenwrite.bin-count.txt'
].map(f => fetch('downloads/' + f).then(r => r.text()).catch(() => '0')))
  .then(counts => document.getElementById('download-count').textContent =
    counts.reduce((sum, c) => sum + (parseInt(c) || 0), 0));