mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +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
|
||||
* @returns {string}
|
||||
*/
|
||||
function getFormattedHours(minues) {
|
||||
const hours = Math.floor(minues / 60);
|
||||
return (hours > 0 ? hours + "h " : "") + (minues % 60).toFixed(1);
|
||||
}
|
||||
function getFormattedHours(minutes) {
|
||||
minutes = Math.round(minutes * 10) / 10
|
||||
const hours = Math.floor(minutes / 60);
|
||||
return (hours > 0 ? hours + "h " : "") + (minutes % 60).toFixed(1);
|
||||
}
|
||||
|
||||
//end of function
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue