-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
164 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ export const BaseHtml = ({ children, title = "ConvertX" }) => ( | |
href="/favicon-16x16.png" | ||
/> | ||
<link rel="manifest" href="/site.webmanifest" /> | ||
<script src="https://unpkg.com/[email protected]" /> | ||
</head> | ||
<body>{children}</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
window.downloadAll = function () { | ||
// Get all download links | ||
const downloadLinks = document.querySelectorAll("a[download]"); | ||
|
||
// Trigger download for each link | ||
downloadLinks.forEach((link, index) => { | ||
// We add a delay for each download to prevent them from starting at the same time | ||
setTimeout(() => { | ||
const event = new MouseEvent("click"); | ||
link.dispatchEvent(event); | ||
}, index * 100); | ||
}); | ||
}; | ||
const jobId = window.location.pathname.split("/").pop(); | ||
const main = document.querySelector("main"); | ||
const progressElem = document.querySelector("progress"); | ||
|
||
const refreshData = () => { | ||
console.log("Refreshing data..."); | ||
console.log(progressElem.value); | ||
console.log(progressElem.max); | ||
|
||
if (progressElem.value !== progressElem.max) { | ||
fetch(`/progress/${jobId}`) | ||
.then((res) => res.text()) | ||
.then((html) => { | ||
main.innerHTML = html; | ||
}) | ||
.catch((err) => console.log(err)); | ||
|
||
setTimeout(refreshData, 1000); | ||
} | ||
}; | ||
|
||
refreshData(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters