Correction du décompte

This commit is contained in:
guimoz 2017-01-29 18:53:32 +01:00
parent 0e6d44c1bc
commit a3c669c817
2 changed files with 1 additions and 18 deletions

View file

@ -305,7 +305,7 @@ def banned():
else: else:
explanation = u'Tu t\'es tranché toi-même, pas de chance...' 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', \ return render_template('banned.html', \
explanation=explanation, timeleft=timeleft) explanation=explanation, timeleft=timeleft)

View file

@ -15,23 +15,6 @@
</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');