Forecast line gets its own tooltip

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-10-20 21:46:37 +01:00
parent 91a5263acf
commit 8d6d23261e
2 changed files with 7 additions and 2 deletions

View file

@ -1016,7 +1016,12 @@ function weatherCard() {
const h = S.happenings, w = h.weather;
return `<div class="stat" title="${esc(weatherTip(w))}"><div class="k">${h.season.icon} ${h.season.name}, day ${h.season.day}</div>
<div class="v">${w.icon} <small>${esc(w.name)}</small></div>
<div class="note">${w.next_icon} ${esc(w.next_name)} in ${countdown(w.until)}</div></div>`;
<div class="note" title="${esc(forecastTip(w))}">${w.next_icon} ${esc(w.next_name)} in ${countdown(w.until)}</div></div>`;
}
// "Fog in 3h 20m: scouting 30% and hunting 10% slower."
function forecastTip(w) {
return `${w.next_name} in ${dur(w.until - serverNow())}: ${w.next_text.charAt(0).toLowerCase()}${w.next_text.slice(1)}.`;
}
// Everything going on in the city right now, and what anyone can do about it.