Correction du décompte
This commit is contained in:
parent
0e6d44c1bc
commit
a3c669c817
2 changed files with 1 additions and 18 deletions
|
@ -305,7 +305,7 @@ def banned():
|
|||
else:
|
||||
explanation = u'Tu t\'es tranché toi-même, pas de chance...'
|
||||
|
||||
timeleft = duration_format(int(player['ban_end'] - time()))
|
||||
timeleft = int(player['ban_end'] - time())
|
||||
|
||||
return render_template('banned.html', \
|
||||
explanation=explanation, timeleft=timeleft)
|
||||
|
|
|
@ -15,23 +15,6 @@
|
|||
</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');
|
||||
|
|
Loading…
Reference in a new issue