<commit_before>function Queue()
{
	var q = this;

	q.jobs = [];
	q.interval = false;
	q.flushing = false;
	q.disabled = false;

	q.push = function(job)
	{
		q.jobs.push(job);
	}

	q.flush = function(callback)
	{
		if (q.disabled)
		{
			return;
		}

		if (q.flushing)
		{
			window.setTimeout(q.flush, 500);
			return;
		}

		q.flushing = true;
		enableExitConfirmation('Changes were not saved!');
		$('#save-info').text('Saving...');

		var url = '/exec';
		var data = {jobs: q.jobs};
		$.post(url, data, function(rawContent)
		{
			var content = $(rawContent);

			//check for any errors, if errors were found - disable all editing
			if (content.find('.error').length > 0)
			{
				alert("An error occured:\n\n" +
					content.find('.error').text() +
					"\n\nPlease reload the page and redo the changes.");
				q.disabled = true;
			}
<commit_msg>Queue - fixed exit confirmation and "saving..."<commit_after>function Queue()
{
	var q = this;

	q.jobs = [];
	q.interval = false;
	q.flushing = false;
	q.disabled = false;

	q.push = function(job)
	{
		$('#save-info').text('Saving...');
		enableExitConfirmation('Changes were not saved!');
		q.jobs.push(job);
	}

	q.flush = function(callback)
	{
		if (q.disabled)
		{
			return;
		}

		if (q.flushing)
		{
			window.setTimeout(q.flush, 500);
			return;
		}

		q.flushing = true;

		var url = '/exec';
		var data = {jobs: q.jobs};
		$.post(url, data, function(rawContent)
		{
			var content = $(rawContent);

			//check for any errors, if errors were found - disable all editing
			if (content.find('.error').length > 0)
			{
				alert("An error occured:\n\n" +
					content.find('.error').text() +
					"\n\nPlease reload the page and redo the changes.");
				q.disabled = true;
			}

{'fraction_non_alphanumeric': 0.17376294591484465, 'fraction_numerical': 0.004602991944764097, 'mean_word_length': 2.7886710239651418, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2189042', 'n_tokens_mistral': 748, 'n_tokens_neox': 628, 'n_words': 151}