Adding to Louys answer, the line with minutes should be for today (2025-03-20):
let minutes = Math.floor(video.currentTime / 60) - (hours * 60)