<commit_before>// wait.js

(function($){

document.documentElement.className += ' wait';
var requestCount = 1;
var lastWait = 0;

function removeWait() {
	$(function() {
		setTimeout(function() {
			requestCount--;
			if (requestCount < 1) {
				var myWait = ++lastWait;
				setTimeout(function() {
					if (myWait == lastWait && requestCount < 1) {
						requestCount = 0;
						$(document.documentElement).removeClass("wait");
					}
				}, 400); // give browser a chance to draw the page
			}
		}, 0);
	});
}

$(removeWait);

$(window).bind("beforeunload unload", function() {
	requestCount++;
	$(document.documentElement).addClass("wait");
});

$(document).ajaxSend(function(event, xhr, options){
	requestCount++;
	$(document.documentElement).addClass("wait");
});
$(document).ajaxComplete(removeWait);

$(document).bind('calliOpenDialog', function(event) {
	requestCount++;
	$(document.documentElement).addClass("wait");
});
$(document).bind('calliCloseDialog', removeWait);

})(window.jQuery);

<commit_msg>Don't use wait cursor when dialogue is open<commit_after>// wait.js

(function($){

document.documentElement.className += ' wait';
var requestCount = 1;
var lastWait = 0;

function removeWait() {
	$(function() {
		setTimeout(function() {
			requestCount--;
			if (requestCount < 1) {
				var myWait = ++lastWait;
				setTimeout(function() {
					if (myWait == lastWait && requestCount < 1) {
						requestCount = 0;
						$(document.documentElement).removeClass("wait");
					}
				}, 400); // give browser a chance to draw the page
			}
		}, 0);
	});
}

$(removeWait);

$(window).bind("beforeunload unload", function() {
	requestCount++;
	$(document.documentElement).addClass("wait");
});

$(document).ajaxSend(function(event, xhr, options){
	requestCount++;
	$(document.documentElement).addClass("wait");
});
$(document).ajaxComplete(removeWait);

})(window.jQuery);


{'fraction_non_alphanumeric': 0.18481147105682422, 'fraction_numerical': 0.009559214020180564, 'mean_word_length': 4.49271137026239, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7469165', 'n_tokens_mistral': 668, 'n_tokens_neox': 577, 'n_words': 121}