Fix window.location properties to match protocol.

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-01-12 20:55:22 +00:00
parent 14c3ffd115
commit dbb9903fee
2 changed files with 2 additions and 4 deletions

View File

@ -35,7 +35,7 @@ async function getQuery(param) {
}
async function publicLdb(stn) {
var url = `http://${window.location.host}/api/v1/ldb/${stn}`;
var url = `${window.location.origin}/api/v1/ldb/${stn}`;
var resp = await fetch(url);
return await resp.json();
}

View File

@ -11,7 +11,5 @@ async function sidebarClose() {
}
async function gotoBoard(station){
console.log(`Finding ${station}`)
var url = `http://${window.location.host}/board.html/${station}`;
window.location.assign(`board.html?stn=${station}`)
window.location.assign(`${window.location.origin}/board.html?stn=${station}`)
}