summaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-10-29 21:10:10 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-10-29 21:10:10 +0200
commitf79c9a794e9e96fb426011b983ab1a23060e554d (patch)
tree285adb88c0c07068a4b4e56bd0f37de9f87e7582 /cgi
parent50b7f80de9b369b5aa99e8cf913bc4d240f017e0 (diff)
cgi: experimental image reload
Diffstat (limited to 'cgi')
-rw-r--r--cgi/index.pl14
1 files changed, 13 insertions, 1 deletions
diff --git a/cgi/index.pl b/cgi/index.pl
index 1f3d61a..346c3e6 100644
--- a/cgi/index.pl
+++ b/cgi/index.pl
@@ -200,7 +200,7 @@ __DATA__
% if ($city and $stop) {
<img src="../../<%= $city %>/<%= $stop %>.png?<%= $params %>" alt=""
-height="<%= $height * 4 %>" width="<%= $width * 4 %>"/>
+id="display" height="<%= $height * 4 %>" width="<%= $width * 4 %>"/>
% }
% else {
@@ -236,6 +236,18 @@ v<%= $version %>
</div>
</body>
+
+<script language="text/javascript">
+function reloadDisplay() {
+ var now = new Date();
+ document.getElementById("display").src
+ = document.getElementById("display").src + '&r=' + now.getTime();
+ setTimeout('reloadDisplay()', 30000);
+}
+
+setTimeout('reloadDisplay()', 30000);
+</script>
+
</html>
@@ not_found.html.ep