summaryrefslogtreecommitdiff
path: root/kvmd/web/js/tools.js
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/web/js/tools.js')
-rw-r--r--kvmd/web/js/tools.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/kvmd/web/js/tools.js b/kvmd/web/js/tools.js
index c8d492e2..d9fe8357 100644
--- a/kvmd/web/js/tools.js
+++ b/kvmd/web/js/tools.js
@@ -1,8 +1,9 @@
var tools = new function() {
- this.makeRequest = function(method, url, callback) {
+ this.makeRequest = function(method, url, callback, timeout=null) {
var http = new XMLHttpRequest();
http.open(method, url, true)
http.onreadystatechange = callback;
+ http.timeout = timeout ? timeout : 5000;
http.send();
return http;
};