mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-13 23:17:05 +03:00
Made time have a zero in front when it is less than 10 seconds.
This commit is contained in:
5
popup.js
5
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;
|
||||
|
||||
Reference in New Issue
Block a user