Parse location from window hash
This commit is contained in:
parent
9e17022bda
commit
c7d64b7c77
|
@ -1,6 +1,9 @@
|
|||
WxData.init();
|
||||
|
||||
WxData.observations('USNY0483:1:US').then(data => {
|
||||
// Default to Atlanta
|
||||
let mainLoc = window.location.hash ? window.location.hash : 'USGA0028:1:US';
|
||||
|
||||
WxData.observations(mainLoc).then(data => {
|
||||
document.getElementById('city').innerText = data.obs_name;
|
||||
document.getElementById('current-temp').innerText = data.temp;
|
||||
document.getElementById('current-info').innerText = data.wx_phrase;
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue