Skip to content

Commit fa63ad2

Browse files
committed
Fix rounding for time for badge text
1 parent 0f072ec commit fa63ad2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
"name": "Web Activity Time Tracker",
55
"short_name": "Web Time Tracker",
6-
"version": "1.5.2",
6+
"version": "1.5.3",
77
"minimum_chrome_version": "26",
88

99
"description": "Track and limit time your activity in the browser every day.",

src/scripts/activity.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class Activity {
128128
}
129129

130130
closeIntervalForCurrentTab() {
131-
if (currentTab !== '') {
131+
if (currentTab !== '' && timeIntervalList != undefined) {
132132
var item = timeIntervalList.find(o => o.domain === currentTab && o.day == new Date().toLocaleDateString("en-US"));
133133
if (item != undefined)
134134
item.closeInterval();

src/scripts/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function convertTimeToSummaryTime(time) {
7373
function convertSummaryTimeToBadgeString(summaryTime) {
7474
var sec = (summaryTime);
7575
var min = (summaryTime / 60).toFixed(0);
76-
var hours = (summaryTime / (60 * 60)).toFixed(0);
76+
var hours = (summaryTime / (60 * 60)).toFixed(1);
7777
var days = (summaryTime / (60 * 60 * 24)).toFixed(0);
7878

7979
if (sec < 60) {

0 commit comments

Comments
 (0)