clkinfostopw - set format to h:mm:ss to shorten string

pull/2692/head
Hugh Barney 2023-04-14 23:54:09 +01:00
parent e9bfe885e7
commit 82b78d5b69
3 changed files with 4 additions and 3 deletions

View File

@ -1 +1,2 @@
0.01: New clkinfo! 0.01: New clkinfo!
0.02: changed format to h:mm:ss, to reduce size of text string

View File

@ -21,10 +21,10 @@
var mins = seconds / 60; var mins = seconds / 60;
seconds %= 60; seconds %= 60;
if (mins < 60) if (mins < 60)
return "".concat(pad2(mins), "m").concat(pad2(seconds), "s"); return "".concat(mins.toFixed(0)+":").concat(pad2(seconds));
var hours = mins / 60; var hours = mins / 60;
mins %= 60; mins %= 60;
return "".concat(Math.round(hours), "h").concat(pad2(mins), "m").concat(pad2(seconds), "s"); return "".concat(hours.toFixed(0)+":").concat(pad2(mins)).concat(pad2(seconds));
}; };
var img = function () { return atob("GBiBAAAAAAB+AAB+AAAAAAB+AAH/sAOB8AcA4A4YcAwYMBgYGBgYGBg8GBg8GBgYGBgAGAwAMA4AcAcA4AOBwAH/gAB+AAAAAAAAAA=="); }; var img = function () { return atob("GBiBAAAAAAB+AAB+AAAAAAB+AAH/sAOB8AcA4A4YcAwYMBgYGBgYGBg8GBg8GBgYGBgAGAwAMA4AcAcA4AOBwAH/gAB+AAAAAAAAAA=="); };
return { return {

View File

@ -1,7 +1,7 @@
{ {
"id": "clkinfostopw", "id": "clkinfostopw",
"name": "Stop Watch Clockinfo", "name": "Stop Watch Clockinfo",
"version":"0.01", "version":"0.02",
"description": "A simple stopwatch, shown via clockinfo", "description": "A simple stopwatch, shown via clockinfo",
"icon": "app.png", "icon": "app.png",
"type": "clkinfo", "type": "clkinfo",