]> prime8.dev >> repos - p8d.git/commitdiff
Show total activity
authorDamian Myrda <monkey.damianek@gmail.com>
Sat, 21 Sep 2024 02:56:01 +0000 (21:56 -0500)
committerDamian Myrda <monkey.damianek@gmail.com>
Sat, 21 Sep 2024 02:56:01 +0000 (21:56 -0500)
web/static/js/wakatime.js

index d1b02bdbec43d73a86ab5a543aaa25a35a930b40..881281f72cdbc8343c46fba5c761e3e99f25c653 100644 (file)
@@ -31,6 +31,10 @@ function createChart(data) {
   table.forEach((row) => {
     chart += createRow(row, max_length, total_hours);
   });
+  var total_minutes = total_hours % 1;
+  total_hours -= total_minutes;
+  total_minutes = Math.ceil(total_minutes * 60);
+  chart += `total: ${total_hours} hours and ${total_minutes} minutes`;
   return chart;
 }