From 3a5255b7ee81ff3f6e4d4f9dd7b7431a0ee4b4c5 Mon Sep 17 00:00:00 2001 From: Max Value Date: Mon, 20 Oct 2025 09:28:15 +0100 Subject: [PATCH] cleanup --- data.db | Bin 12288 -> 12288 bytes static/utils.js | 23 +++++++++-------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/data.db b/data.db index f4195e982a21c1f9818a69e3b7bcbe539efceb37..6774704cc7a6eaf391c393b1046cf0c2f1b9b168 100755 GIT binary patch delta 153 zcmZojXh@hKCB!Dnz`(!^#8AK}G*QQhiA{E6!ZLZ5sSNy6Hwy}M^Jix=YA`S|GIDTm z07*$s2;g90VF8M;umHt?fP;xqQe2&vi;KyKJ=#D=!7w(XRYV((n=fl-us>;M0s}@P djhxK9)Wo9TjQr9P$GrTKjMO59lGNf7MF0w79VY+) delta 147 zcmZojXh@hKCB*8^z`(!^#4xaBqK*+0tNX@;W%4Yu8Te;!78IDspPJ05!N3Rw9FiQI zV8Fq`!otA;B!L7_4u~bi<@r+5lH*gDjG_&66bxfC*q^)v;zA%^o5BA06_9RcVqy}~ Z$jQu0O)Lt|$S*A^Ni8l>$jdKD1puNWAz=Uj diff --git a/static/utils.js b/static/utils.js index 8cc47a2..d704300 100644 --- a/static/utils.js +++ b/static/utils.js @@ -1,17 +1,3 @@ -export function makeTime(end) { - let current = Date.now() / 1000; - var time = parseFloat(end) - current; - - if (Math.sign(time) == -1) {time = 0;} - var minutes = Math.floor(time / 60); - var seconds = Math.floor(time - (minutes * 60)); - - var minutesString = minutes.toString().padStart(2, "0"); - var secondsString = seconds.toString().padStart(2, "0"); - - return `${minutesString}:${secondsString}`; -} - export function getTime(end) { let current = Date.now() / 1000; var time = parseFloat(end) - current; @@ -23,3 +9,12 @@ export function getTime(end) { return [minutes, seconds, secondsFull] } + +export function makeTime(end) { + let [minutes, seconds, _] = getTime(end); + + var minutesString = minutes.toString().padStart(2, "0"); + var secondsString = seconds.toString().padStart(2, "0"); + + return `${minutesString}:${secondsString}`; +} -- 2.39.2