diff options
Diffstat (limited to 'web')
| -rw-r--r-- | web/index.html | 2 | ||||
| -rw-r--r-- | web/index.js (renamed from web/script.js) | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/web/index.html b/web/index.html index f927d39..0fa0cea 100644 --- a/web/index.html +++ b/web/index.html | |||
| @@ -47,6 +47,6 @@ | |||
| 47 | </dialog> | 47 | </dialog> |
| 48 | 48 | ||
| 49 | <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js" integrity="sha512-BwHfrr4c9kmRkLw6iXFdzcdWV/PGkVgiIyIWLLlTSXzWQzxuSg4DiQUCpauz/EWjgk5TYQqX/kvn9pG1NpYfqg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | 49 | <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js" integrity="sha512-BwHfrr4c9kmRkLw6iXFdzcdWV/PGkVgiIyIWLLlTSXzWQzxuSg4DiQUCpauz/EWjgk5TYQqX/kvn9pG1NpYfqg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> |
| 50 | <script src="script.js"></script> | 50 | <script src="index.js"></script> |
| 51 | </body> | 51 | </body> |
| 52 | </html> | 52 | </html> |
diff --git a/web/script.js b/web/index.js index b3179b3..316e73f 100644 --- a/web/script.js +++ b/web/index.js | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | const apiBaseUrl = "https://api.routemon.fautchen.eu"; | ||
| 2 | |||
| 1 | const dialog = document.querySelector("dialog"); | 3 | const dialog = document.querySelector("dialog"); |
| 2 | const closeButton = document.querySelector("dialog button"); | 4 | const closeButton = document.querySelector("dialog button"); |
| 3 | closeButton.addEventListener("click", () => { | 5 | closeButton.addEventListener("click", () => { |
| @@ -73,7 +75,7 @@ async function showProblem(rsp) { | |||
| 73 | } | 75 | } |
| 74 | 76 | ||
| 75 | async function getSysinfo() { | 77 | async function getSysinfo() { |
| 76 | const rsp = await fetch("http://localhost:8284/sysinfo", { | 78 | const rsp = await fetch(apiBaseUrl + "/sysinfo", { |
| 77 | method: "GET", | 79 | method: "GET", |
| 78 | headers: { | 80 | headers: { |
| 79 | "Accept-Language": "nl-NL", | 81 | "Accept-Language": "nl-NL", |
| @@ -89,7 +91,7 @@ async function getSysinfo() { | |||
| 89 | } | 91 | } |
| 90 | 92 | ||
| 91 | async function load(gpxFile) { | 93 | async function load(gpxFile) { |
| 92 | const rsp = await fetch("http://localhost:8284/gpx", { | 94 | const rsp = await fetch(apiBaseUrl + "/gpx", { |
| 93 | method: "POST", | 95 | method: "POST", |
| 94 | headers: { | 96 | headers: { |
| 95 | "Accept-Language": "nl-NL", | 97 | "Accept-Language": "nl-NL", |