mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 18:11:54 +08:00
minor js fixes
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user