summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/share/js/kvm/ocr.js2
-rw-r--r--web/share/js/tools.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/web/share/js/kvm/ocr.js b/web/share/js/kvm/ocr.js
index 7bf2ad5a..482e9da9 100644
--- a/web/share/js/kvm/ocr.js
+++ b/web/share/js/kvm/ocr.js
@@ -186,7 +186,7 @@ export function Ocr(__getGeometry) {
tools.el.setEnabled($("stream-ocr-lang-selector"), true);
$("stream-ocr-led").className = "led-gray";
}
- });
+ }, null, null, 30000);
};
__init__();
diff --git a/web/share/js/tools.js b/web/share/js/tools.js
index 006453bd..31e8b9b4 100644
--- a/web/share/js/tools.js
+++ b/web/share/js/tools.js
@@ -36,14 +36,14 @@ export var tools = new function() {
/************************************************************************/
- self.makeRequest = function(method, url, callback, body=null, content_type=null) {
+ self.makeRequest = function(method, url, callback, body=null, content_type=null, timeout=15000) {
let http = new XMLHttpRequest();
http.open(method, url, true);
if (content_type) {
http.setRequestHeader("Content-Type", content_type);
}
http.onreadystatechange = callback;
- http.timeout = 15000;
+ http.timeout = timeout;
http.send(body);
return http;
};