+
+ cal.on("mouseover", (event, _timestamp, value) => {
+ if (value) event.target.style.cursor = "pointer";
+ });
+
+ cal.on("click", (_event, timestamp) => {
+ if (!displayName) return;
+ for (const { date, max_id } of heatmapData) {
+ if (!max_id) continue;
+ if (timestamp !== Date.parse(date)) continue;
+ const params = new URLSearchParams([["before", max_id + 1]]);
+ location = `/user/${encodeURIComponent(displayName)}/history?${params}`;
+ }
+ });