Compare commits

...

3 Commits
3.7.1 ... 3.7.2

Author SHA1 Message Date
Ajay Ramachandran
6ed946c998 bump version 2022-01-01 14:41:07 -05:00
Ajay Ramachandran
894410db98 Merge pull request #1115 from Choromanski/master
Fixed minute to day conversion
2021-12-31 16:36:52 -05:00
Brian Choromanski
0336157673 Fixed minute to day conversion 2021-12-31 16:34:29 -05:00
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "SponsorBlock",
"version": "3.7.1",
"version": "3.7.2",
"default_locale": "en",
"description": "__MSG_Description__",
"homepage_url": "https://sponsor.ajay.app",

View File

@@ -739,7 +739,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
*/
function getFormattedHours(minutes) {
minutes = Math.round(minutes * 10) / 10;
const days = Math.floor(minutes / 3600);
const days = Math.floor(minutes / 1440);
const hours = Math.floor(minutes / 60) % 24;
return (days > 0 ? days + chrome.i18n.getMessage("dayAbbreviation") + " " : "") + (hours > 0 ? hours + chrome.i18n.getMessage("hourAbbreviation") + " " : "") + (minutes % 60).toFixed(1);
}