diff --git a/renderer.js b/renderer.js index 964c948..6386289 100644 --- a/renderer.js +++ b/renderer.js @@ -307,7 +307,14 @@ folders.forEach(folderObj => { - + // Countdown in MM:SS-Format + function formatCountdown(ms) { + if (!ms || ms <= 0) return '00:00'; + const s = Math.floor(ms / 1000); + const m = Math.floor(s / 60).toString().padStart(2, '0'); + const sec = (s % 60).toString().padStart(2, '0'); + return `${m}:${sec}`; + }