X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=kiosk.py;h=6003165a674e1f2ed76f18f8ffe8812f7c67b6e5;hb=37b72e72c59140c4a6f7f541c716e4b0bc254b08;hp=fd509101804bf41312d77eccc01ea99b91500bc6;hpb=2b9b0b77c646a5c3973624fe9aa115680d69f77d;p=kiosk.git diff --git a/kiosk.py b/kiosk.py index fd50910..6003165 100755 --- a/kiosk.py +++ b/kiosk.py @@ -191,11 +191,11 @@ def emit_wrapped(f, filename): if (remainingMs > 0) { var hr = document.getElementById("countdown"); var width = (remainingMs / (totalMs - 5000)) * 100.0; - if (width > 100) { - width = 100; + if (width <= 100) { + hr.style.visibility = "visible"; + hr.style.width = " ".concat(width, "%%"); + hr.style.backgroundColor = "maroon"; } - hr.style.width = " ".concat(width, "%%"); - hr.style.backgroundColor = "maroon"; } else { // Reload unconditionally after 22 sec. window.location.reload(); @@ -256,11 +256,11 @@ def emit_wrapped(f, filename):