Fix window.location properties to match protocol.
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
14c3ffd115
commit
dbb9903fee
@ -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();
|
||||
}
|
||||
|
@ -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}`)
|
||||
}
|
Reference in New Issue
Block a user