diff options
author | Devaev Maxim <[email protected]> | 2018-07-16 05:16:53 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-07-16 05:16:53 +0300 |
commit | 211401b52c1d334b50dede28bab0a3a6e056992e (patch) | |
tree | cb2389d5b9a061ae1b2eb4919e0195374e043513 /kvmd/web/js/tools.js | |
parent | 52bf4f38e42852818354ca7f182b589a2f09631d (diff) |
minor js fixes
Diffstat (limited to 'kvmd/web/js/tools.js')
-rw-r--r-- | kvmd/web/js/tools.js | 3 |
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; }; |