Game fixes and ocr docs (#824)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user