From 4d55a716195566a02ee1792a0294710b21d54412 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 18 Jul 2020 22:19:13 -0400 Subject: [PATCH 1/2] Fixed minutes not displaying zero when hours are displayed --- src/utils.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 53e4d694..43cdc68e 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -334,6 +334,7 @@ class Utils { getFormattedTime(seconds: number, precise?: boolean): string { let hours = Math.floor(seconds / 60 / 60); let minutes = Math.floor(seconds / 60) % 60; + let minutesDisplay = String(minutes); let secondsNum = seconds % 60; if (!precise) { secondsNum = Math.floor(secondsNum); @@ -345,8 +346,12 @@ class Utils { //add a zero secondsDisplay = "0" + secondsDisplay; } + if (hours && minutes < 10) { + //add a zero + minutesDisplay = "0" + minutesDisplay; + } - let formatted = (hours ? hours + ":" : "") + minutes + ":" + secondsDisplay; + let formatted = (hours ? hours + ":" : "") + minutesDisplay + ":" + secondsDisplay; return formatted; } From df1d3b401c53228d4fba97455622597d2f4f140a Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 18 Jul 2020 22:19:47 -0400 Subject: [PATCH 2/2] Update version number --- manifest/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest/manifest.json b/manifest/manifest.json index ee6e5c35..b15524c7 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "SponsorBlock", - "version": "2.0.4.1", + "version": "2.0.4.2", "default_locale": "en", "description": "__MSG_Description__", "content_scripts": [{