From a6735c41ab8e62475065f83924f31408f6911757 Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Sun, 28 Jan 2024 15:48:42 +0100 Subject: [PATCH] Implemented Hit/Miss to title of streak indicators --- index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 7f5c8b5..e594d90 100644 --- a/index.html +++ b/index.html @@ -332,18 +332,21 @@ const adjustedDate = new Date((new Date()).getTime() - offset * 24 * 60 * 60 * 1000); const formattedDate = adjustedDate.toISOString().split('T')[0]; + let titleSuffix = "" if (streakData.length > 0) { if (streakData.includes(formattedDate)) { classes.push("bi-circle-fill"); + titleSuffix = " | Hit"; } else if (offset == 0) { classes.push("bi-circle-half"); } else { classes.push("bi-circle"); + titleSuffix = " | Miss"; } } document.getElementById("day-" + offset).classList = classes.join(" "); - document.getElementById("day-" + offset).title = formattedDate; + document.getElementById("day-" + offset).title = formattedDate + titleSuffix; } }