mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 13:07:05 +03:00
Show decimals in popup
This commit is contained in:
@@ -598,8 +598,8 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
|||||||
//converts time in seconds to minutes:seconds
|
//converts time in seconds to minutes:seconds
|
||||||
function getFormattedTime(seconds) {
|
function getFormattedTime(seconds) {
|
||||||
const minutes = Math.floor(seconds / 60);
|
const minutes = Math.floor(seconds / 60);
|
||||||
const secondsDisplayNumber = Math.floor(seconds - minutes * 60);
|
const secondsDisplayNumber = seconds - minutes * 60;
|
||||||
let secondsDisplay = String(secondsDisplayNumber);
|
let secondsDisplay = secondsDisplayNumber.toFixed(3);
|
||||||
if (secondsDisplayNumber < 10) {
|
if (secondsDisplayNumber < 10) {
|
||||||
//add a zero
|
//add a zero
|
||||||
secondsDisplay = "0" + secondsDisplay;
|
secondsDisplay = "0" + secondsDisplay;
|
||||||
|
|||||||
Reference in New Issue
Block a user