diff --git a/view-train.js b/view-train.js
index 6f0fa97..49160d7 100644
--- a/view-train.js
+++ b/view-train.js
@@ -16,6 +16,7 @@ function onTrainData(data) {
title.appendChild(document.createTextNode(` ${data.number}`))
document.getElementById('company').textContent = data.operator
+ document.getElementById('date').textContent = data.date
document.getElementById('route-from').textContent = data.route.from
document.getElementById('route-to').textContent = data.route.to
@@ -198,6 +199,9 @@ function refresh() {
onTrainData(response)
})
.then(function () {
+ if (refreshStopToken != null) {
+ clearTimeout(refreshStopToken)
+ }
refreshStopToken = setTimeout(function () {
refresh()
}, 60000)