Game fixes and ocr docs (#824)

This commit is contained in:
Anthony Stirling
2024-02-17 23:23:07 +00:00
committed by GitHub
parent 8d9f0361d0
commit 673f005fe6
13 changed files with 50 additions and 47 deletions

View File

@@ -25,6 +25,17 @@ $(document).ready(function () {
const originalButtonText = $("#submitBtn").text();
$("#submitBtn").text("Processing...");
console.log(override);
// Set a timeout to show the game button if operation takes more than 5 seconds
const timeoutId = setTimeout(() => {
var boredWaiting = localStorage.getItem("boredWaiting") || "disabled";
const showGameBtn = document.getElementById('show-game-btn');
if(boredWaiting === "enabled" && showGameBtn){
showGameBtn.style.display = 'block';
}
}, 5000);
try {
if (remoteCall === true) {
if (override === "multi" || (!multiple && files.length > 1 && override !== "single")) {
@@ -33,8 +44,11 @@ $(document).ready(function () {
await handleSingleDownload(url, formData);
}
}
clearTimeout(timeoutId);
$("#submitBtn").text(originalButtonText);
} catch (error) {
clearTimeout(timeoutId);
handleDownloadError(error);
$("#submitBtn").text(originalButtonText);
console.error(error);