From ca4f91f39b1c176fefa359fd34ab268ba56018bc Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Thu, 11 Jul 2019 14:00:03 -0400 Subject: [PATCH] Made time have a zero in front when it is less than 10 seconds. --- popup.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/popup.js b/popup.js index 306308dd..a322241b 100644 --- a/popup.js +++ b/popup.js @@ -241,6 +241,11 @@ function displayNoVideo() { function getFormattedTime(seconds) { let minutes = Math.floor(seconds / 60); let secondsDisplay = Math.round(seconds - minutes * 60); + if (secondsDisplay < 10) { + //add a zero + secondsDisplay = "0" + secondsDisplay; + } + let formatted = minutes+ ":" + secondsDisplay; return formatted;