mirror of
https://github.com/vrana/adminer.git
synced 2025-08-11 17:14:07 +02:00
Save bytes
This commit is contained in:
@@ -139,14 +139,8 @@ var ajaxTimeout;
|
|||||||
* @return XMLHttpRequest or false in case of an error
|
* @return XMLHttpRequest or false in case of an error
|
||||||
*/
|
*/
|
||||||
function ajax(url) {
|
function ajax(url) {
|
||||||
var xmlhttp;
|
var xmlhttp = (window.XMLHttpRequest ? new XMLHttpRequest() : (window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : false));
|
||||||
if (window.XMLHttpRequest) {
|
if (xmlhttp) {
|
||||||
xmlhttp = new XMLHttpRequest();
|
|
||||||
} else if (window.ActiveXObject) {
|
|
||||||
xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
var currentState = ++ajaxState;
|
var currentState = ++ajaxState;
|
||||||
clearTimeout(ajaxTimeout);
|
clearTimeout(ajaxTimeout);
|
||||||
ajaxTimeout = setTimeout(function () {
|
ajaxTimeout = setTimeout(function () {
|
||||||
@@ -164,6 +158,7 @@ function ajax(url) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
xmlhttp.send('');
|
xmlhttp.send('');
|
||||||
|
}
|
||||||
return xmlhttp;
|
return xmlhttp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user