small change

posts
serr 2025-04-22 13:13:04 +03:00
parent b384341254
commit f3a14b50b2
1 changed files with 9 additions and 9 deletions

View File

@ -36,14 +36,14 @@
</footer> </footer>
<script> <script>
fetch('/', {method: 'COUNT'}) fetch('/', {method: 'COUNT'})
.then(r => r.text()) .then(r => r.text())
.then(num => num.trim()) .then(num => num.trim())
.then(number => { .then(number => {
if (number.length > 0) { if (number.length > 0) {
document.querySelector('p.count').innerHTML = document.querySelector('p.count').innerHTML =
[...number].map(d => `<img src="/assets/pic/${d}.gif?v={{ .version }}">`).join(''); [...number].map(d => `<img src="/assets/pic/${d}.gif?v={{ .version }}">`).join('');
} }
}) })
.catch(console.error); .catch(console.error);
</script> </script>
{{ end }} {{ end }}