Correction du chrono
This commit is contained in:
parent
5b37cf7d3a
commit
6b5efa54ce
2 changed files with 19 additions and 2 deletions
|
@ -8,13 +8,30 @@
|
||||||
Rétablissement de la connexion externe dans approximativement :
|
Rétablissement de la connexion externe dans approximativement :
|
||||||
</p>
|
</p>
|
||||||
<p style="text-align: center">
|
<p style="text-align: center">
|
||||||
<strong><span id="time"></span></strong>.
|
<strong><span id="time">30:00</span></strong>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
(redémarrer le navigateur peut être nécessaire une fois ce délai écoulé)
|
(redémarrer le navigateur peut être nécessaire une fois ce délai écoulé)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<script type='text/javascript'>
|
<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 () {
|
window.onload = function () {
|
||||||
var fiveMinutes = {{ timeleft }},
|
var fiveMinutes = {{ timeleft }},
|
||||||
display = document.querySelector('#time');
|
display = document.querySelector('#time');
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<title>Rezo-roulette Metzquetaires</title>
|
<title>Rezo-roulette Metzquetaires</title>
|
||||||
<meta http-equiv="content-type"
|
<meta http-equiv="content-type"
|
||||||
content="text/html;charset=utf-8" />
|
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') }}" />
|
<link rel="stylesheet" href="{{ url_for('static', filename='style_red.css') }}" />
|
||||||
<script type="text/javascript" src="{{ url_for('static', filename='javascript.js') }}"></script>
|
<script type="text/javascript" src="{{ url_for('static', filename='javascript.js') }}"></script>
|
||||||
<link rel="shortcut icon" type="image/x-icon"
|
<link rel="shortcut icon" type="image/x-icon"
|
||||||
|
|
Loading…
Reference in a new issue