mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-13 02:14:23 +01:00
fix wrong saved time rounding
This commit is contained in:
parent
257098fd96
commit
606b2fbee3
1 changed files with 5 additions and 4 deletions
|
@ -726,10 +726,11 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||||
* @param {float} seconds
|
* @param {float} seconds
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
function getFormattedHours(minues) {
|
function getFormattedHours(minutes) {
|
||||||
const hours = Math.floor(minues / 60);
|
minutes = Math.round(minutes * 10) / 10
|
||||||
return (hours > 0 ? hours + "h " : "") + (minues % 60).toFixed(1);
|
const hours = Math.floor(minutes / 60);
|
||||||
}
|
return (hours > 0 ? hours + "h " : "") + (minutes % 60).toFixed(1);
|
||||||
|
}
|
||||||
|
|
||||||
//end of function
|
//end of function
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue