Get weather source attribution from server (close #43)
This commit is contained in:
parent
304240bf91
commit
69f691caab
@ -57,6 +57,8 @@ function loadWeather(reload) {
|
||||
}
|
||||
$("#forecast-location").text(resp.location_name);
|
||||
$("#forecast-info").text("Forecast covers the next " + resp.forecast_hours + " hours (until " + timestampToTimeString(resp.forecast_until) + ").");
|
||||
$("#forecast-creditlink").text(resp.source.text);
|
||||
$("#forecast-creditlink").attr("onclick", "openExternalBrowser('" + resp.source.url + "')");
|
||||
} else {
|
||||
app.dialog.alert(resp.message, "Error");
|
||||
}
|
||||
|
@ -44,7 +44,7 @@
|
||||
<br />
|
||||
<span id="forecast-info"></span>
|
||||
<br />
|
||||
<a href="" onclick="openExternalBrowser('https://darksky.net/poweredby/')">Powered by Dark Sky</a>
|
||||
<a id="forecast-creditlink" href="" onclick=""></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user