Skip to content

Commit

Permalink
Update inject.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rlauuzo committed Jul 30, 2024
1 parent 8d63f5a commit 3539e07
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ConfusedPolarBear.Plugin.IntroSkipper/Configuration/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,10 @@ const introSkipper = {
});
},
formatTime(totalSeconds) {
const hours = Math.floor(totalSeconds / 3600);
const minutes = Math.floor((totalSeconds % 3600) / 60);
const seconds = Math.round(totalSeconds % 60);
const totalRoundedSeconds = Math.round(totalSeconds);
const hours = Math.floor(totalRoundedSeconds / 3600);
const minutes = Math.floor((totalRoundedSeconds % 3600) / 60);
const seconds = totalRoundedSeconds % 60;
let result = [];
if (hours > 0) result.push(`${hours} hour${hours !== 1 ? 's' : ''}`);
if (minutes > 0) result.push(`${minutes} minute${minutes !== 1 ? 's' : ''}`);
Expand Down

0 comments on commit 3539e07

Please sign in to comment.