<commit_before>function has_class(elem, class) {
	if (elem.className) {
		var class_list = elem.className.split(' ');
		class = class.toUpperCase();
		for (var i=0; i<class_list.length; i++) {
			if ( class_list[i].toUpperCase() == class) {
				return true;
			}
		}
	}
	return false;
}
function disableSelection(target){
	if (typeof target.onselectstart!="undefined")
		target.onselectstart=function(){return false}
	else if (typeof target.style.MozUserSelect!="undefined")
		target.style.MozUserSelect="none"
	else
		target.onmousedown=function(){return false}
	target.style.cursor = "default"
}

var switch_direction = '';
function time_grid_mouse_down(from_time,day,switchd) {
	elem = $(day+'__'+from_time);
	if (!elem) {
//		alert(day+'__'+from_time+': element not found');
		return;
	}
	if (has_class(elem,'unused'))
		switch_direction = 'used';
	else <commit_msg>Utils/Planner - FF5 bug fix<commit_after>function has_class(elem, current_class) {
	if (elem.className) {
		var class_list = elem.className.split(' ');
		current_class = current_class.toUpperCase();
		for (var i=0; i<class_list.length; i++) {
			if ( class_list[i].toUpperCase() == current_class) {
				return true;
			}
		}
	}
	return false;
}
function disableSelection(target){
	if (typeof target.onselectstart!="undefined")
		target.onselectstart=function(){return false}
	else if (typeof target.style.MozUserSelect!="undefined")
		target.style.MozUserSelect="none"
	else
		target.onmousedown=function(){return false}
	target.style.cursor = "default"
}

var switch_direction = '';
function time_grid_mouse_down(from_time,day,switchd) {
	elem = $(day+'__'+from_time);
	if (!elem) {
//		alert(day+'__'+from_time+': element not found');
		return;
	}
	if (has_class(elem,'unused'))
		switch_direction = 'used';
	else 
{'fraction_non_alphanumeric': 0.15677491601343785, 'fraction_numerical': 0.0016797312430011197, 'mean_word_length': 5.270175438596492, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4647156', 'n_tokens_mistral': 661, 'n_tokens_neox': 631, 'n_words': 117}