📅  最后修改于: 2022-03-11 15:02:54.732000             🧑  作者: Mango
// site.js
$(function() {
window.ajax_loading = false;
$.hasAjaxRunning = function() {
return window.ajax_loading;
};
$(document).ajaxStart(function() {
window.ajax_loading = true;
console.log('started')
});
$(document).ajaxStop(function() {
window.ajax_loading = false;
console.log('stopped')
});
});
//logs in dev console whenever an ajax process starts and/or stops