From e54544ac581bb239acf4da088bbca7b5ff0f3371 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Thu, 08 Dec 2016 22:39:09 +0000
Subject: [PATCH] Hide error message on successful AJAX response
---
index.js | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/index.js b/index.js
index 9a1108b..20bc206 100644
--- a/index.js
+++ b/index.js
@@ -123,6 +123,10 @@
}
}
+function fail_hide() {
+ alert.style.display = 'none';
+}
+
function loadTimes(stopId = null, clearRoute = false) {
if(!stopId) stopId = stop_id;
if(!stopId) return;
@@ -231,6 +235,7 @@
}
startTimer(new Date());
+ fail_hide();
times_timer = setTimeout(function(){ loadTimes(); }, ttss_refresh);
}).fail(fail_ajax);
--
Gitblit v1.9.1