Correction du chrono

This commit is contained in:
guimoz 2017-01-29 18:44:32 +01:00
parent 5b37cf7d3a
commit 6b5efa54ce
2 changed files with 19 additions and 2 deletions

View file

@ -8,13 +8,30 @@
Rétablissement de la connexion externe dans approximativement :
</p>
<p style="text-align: center">
<strong><span id="time"></span></strong>.
<strong><span id="time">30:00</span></strong>.
</p>
<p>
(redémarrer le navigateur peut être nécessaire une fois ce délai écoulé)
</p>
<script type='text/javascript'>
function startTimer(duration, display) {
var timer = duration, minutes, seconds;
setInterval(function () {
minutes = parseInt(timer / 60, 10)
seconds = parseInt(timer % 60, 10);
minutes = minutes < 10 ? "0" + minutes : minutes;
seconds = seconds < 10 ? "0" + seconds : seconds;
display.textContent = minutes + ":" + seconds;
if (--timer < 0) {
timer = duration;
}
}, 1000);
}
window.onload = function () {
var fiveMinutes = {{ timeleft }},
display = document.querySelector('#time');

View file

@ -5,7 +5,7 @@
<title>Rezo-roulette Metzquetaires</title>
<meta http-equiv="content-type"
content="text/html;charset=utf-8" />
<meta http-equiv="refresh" content="20">
<meta http-equiv="refresh" content="60">
<link rel="stylesheet" href="{{ url_for('static', filename='style_red.css') }}" />
<script type="text/javascript" src="{{ url_for('static', filename='javascript.js') }}"></script>
<link rel="shortcut icon" type="image/x-icon"