1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-27 06:23:53 +01:00

library cleanup / code cleanup + custom titles

This commit is contained in:
NoobishSVK
2024-01-21 23:14:56 +01:00
parent 830d79564f
commit 8a450f74da
7 changed files with 41 additions and 164 deletions

View File

@@ -39,12 +39,15 @@ function zoomOut() {
}
function getInitialSettings() {
fetch('/coordinates')
fetch('/static_data')
.then(response => response.json())
.then(data => {
// Use the received data (data.qthLatitude, data.qthLongitude) as needed
localStorage.setItem('qthLatitude', data.qthLatitude);
localStorage.setItem('qthLongitude', data.qthLongitude);
localStorage.setItem('webServerName', data.webServerName);
document.title = 'FM-DX Webserver [' + data.webServerName + ']';
})
.catch(error => console.error('Error:', error));
}