*/
function ajaxSend(url, data, popState) {
var currentState = ++ajaxState;
- replaceFavicon('../adminer/static/loader.gif');
+ onblur = function () {
+ replaceFavicon('../adminer/static/loader.gif');
+ };
setHtml('loader', '<img src="../adminer/static/loader.gif" alt="">');
return ajax(url, function (xmlhttp) {
if (currentState == ajaxState) {
}
return ajaxSend(redirect);
}
+ onblur = function () { };
replaceFavicon('../adminer/static/favicon.ico');
if (!xmlhttp.status) {
setHtml('loader', '');
/** Revive page from history
* @param PopStateEvent|history
*/
-window.onpopstate = function (event) {
+onpopstate = function (event) {
ajaxSend(location.href, event.state, 1); // 1 - disable pushState
}