diff --git a/index.html b/index.html index dcd683c..07d078e 100644 --- a/index.html +++ b/index.html @@ -1780,6 +1780,12 @@ window.weatherThemes = { } else if (i === 3 && d === 0) { slotDate.setDate(slotDate.getDate() + 1); } + var currentUnits = (window.CONFIG && window.CONFIG.units) || 'metric'; + var convertTemp = function(c) { + return currentUnits === 'imperial' + ? Math.round(c * 9 / 5 + 32) + '\u00b0F' + : Math.round(c) + '\u00b0C'; + }; var slotIdx = findHourlyIndex(slotDate, hourly.time); var slotCode = hourly.weather_code[slotIdx]; var slotTemp = hourly.temperature_2m[slotIdx]; @@ -1787,14 +1793,14 @@ window.weatherThemes = { slotsHtml += '