<commit_before>var main = {
	context: this
}

main.getXHTTPTransport = function() {

	var result = false;
	var actions = [
		function() { return new XMLHttpRequest() },
		function() { return new ActiveXObject( 'Msxml2.XMLHTTP' ) },
		function() { return new ActiveXObject( 'Microsoft.XMLHTTP' ) }
	];
	for(var i = 0; i < actions.length; i++) {
		try{
			result = actions[i]();
			break;
		} catch (e) {}
	}
	return result;
}

main.httpRequest = function( url, params ) {

	var ajax = main.getXHTTPTransport();
	ajax.onReadyStateChange = function() {
		document.body.style.cursor = ( ajax.readyState == 4 ? 'default' : 'wait' );
		if( document.getElementById( 'loading' ) ) {
			document.getElementById( 'loading' ).style.display = ( ajax.readyState == 4 ? 'none' : 'block' );
		}
	}
	var data = null;
	if( typeof params == 'undefined' ) {
		ajax.open( 'GET', url, false );
	} else {
		ajax.open( 'POST', url, false );
		ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		data = 'json=' + JSON.stringify( params );
	}
	ajax.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest' );
	ajax.send( data );
	return ajax.responseText;
}

main.loadedModules = []

main.include = function( path ) {

	if( main.loadedModules[path] ) {
		return false;
	}
	main.loadedModules[path] = true;
	var transport = main.getXHTTPTransport();
	transport.open( 'GET', path, false );
	transport.send( null );
	
	var code = transport.responseText;
	(typeof execScript != 'undefined') ? execScript(code) : 
		(main.context.eval ? main.context.eval( code ) : eval( code ));
	return true;
}

main.include( '/js/common/events.js' );
main.include( '/js/common/json.js' );
main.include( '/js/common/editor.js' );
main.include( '/js/includes.js' );

<commit_msg>Убран include js-инициализатора ckeditorа (предпологается подключать вручную)<commit_after>var main = {
	context: this
}

main.getXHTTPTransport = function() {

	var result = false;
	var actions = [
		function() { return new XMLHttpRequest() },
		function() { return new ActiveXObject( 'Msxml2.XMLHTTP' ) },
		function() { return new ActiveXObject( 'Microsoft.XMLHTTP' ) }
	];
	for(var i = 0; i < actions.length; i++) {
		try{
			result = actions[i]();
			break;
		} catch (e) {}
	}
	return result;
}

main.httpRequest = function( url, params ) {

	var ajax = main.getXHTTPTransport();
	ajax.onReadyStateChange = function() {
		document.body.style.cursor = ( ajax.readyState == 4 ? 'default' : 'wait' );
		if( document.getElementById( 'loading' ) ) {
			document.getElementById( 'loading' ).style.display = ( ajax.readyState == 4 ? 'none' : 'block' );
		}
	}
	var data = null;
	if( typeof params == 'undefined' ) {
		ajax.open( 'GET', url, false );
	} else {
		ajax.open( 'POST', url, false );
		ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		data = 'json=' + JSON.stringify( params );
	}
	ajax.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest' );
	ajax.send( data );
	return ajax.responseText;
}

main.loadedModules = []

main.include = function( path ) {

	if( main.loadedModules[path] ) {
		return false;
	}
	main.loadedModules[path] = true;
	var transport = main.getXHTTPTransport();
	transport.open( 'GET', path, false );
	transport.send( null );
	
	var code = transport.responseText;
	(typeof execScript != 'undefined') ? execScript(code) : 
		(main.context.eval ? main.context.eval( code ) : eval( code ));
	return true;
}

main.include( '/js/common/events.js' );
main.include( '/js/common/json.js' );
main.include( '/js/includes.js' );


{'fraction_non_alphanumeric': 0.17156585641605426, 'fraction_numerical': 0.0022611644997173543, 'mean_word_length': 3.9565826330532214, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '916673', 'n_tokens_mistral': 1282, 'n_tokens_neox': 1224, 'n_words': 270}