feat: Allow to chose webroot

issue #180
This commit is contained in:
C4illin 2024-11-06 08:49:53 +01:00
parent f3a4aece46
commit 36cb6cc589
7 changed files with 114 additions and 86 deletions

View file

@ -1,3 +1,5 @@
const webroot = document.querySelector("meta[name='webroot']").content;
window.downloadAll = function () {
// Get all download links
const downloadLinks = document.querySelectorAll("a[download]");
@ -18,7 +20,7 @@ let progressElem = document.querySelector("progress");
const refreshData = () => {
// console.log("Refreshing data...", progressElem.value, progressElem.max);
if (progressElem.value !== progressElem.max) {
fetch(`/progress/${jobId}`, {
fetch(`${webroot}/progress/${jobId}`, {
method: "POST",
})
.then((res) => res.text())