<commit_before>//= require jquery
//= require jquery_ujs
//= require_self
//= require_tree .

$(window).load(function() {
	fadeout('#notice');
	fadeout('#alert');

	// Bindings
	$('.back_link').on('click', function(){
		show_element('#files_and_folders');
	});

	$('.permissions_link').on('click', function(){
		show_element('#permissions');
	});

	$('.clipboard_link').on('click', function(){
		show_element('#clipboard');
	});
});

function fadeout(element)
{
	if($(element) != undefined)
	{
		$(element).delay(1500).fadeOut('slow');
	}
}

function show_element(element)
{
	if($(element).is(':visible')) { element = '#files_and_folders'; }

	elements = ['#files_and_folders', '#permissions', '#clipboard'];
	elements.splice(elements.indexOf(element), 1);

	jQuery.each(elements, function(index, value) {
		if($(value) != undefined && $(value).is(':visible')) { $(value).slideUp('slow'); }
	});

	$(element).slideDown('slow');
	if($(element + '_link') != undefined) { $(element + '_link').removeClass('folder_menu').addClass('highlight'); }

	jQuery.each(elements, function(index, value) {
		if($(value + '_link') != undefined) { $(value + '_link').removeClass('highlight').addClass('folder_menu'); }
	});
}

function update_counter(element)
{
	$('#counter').html(element.value.length);
	$('#counter').css('color', element.value.length > 256 ? '#F00' : '#000');
}
<commit_msg>Added preventDefault() to js bindings<commit_after>//= require jquery
//= require jquery_ujs
//= require_self
//= require_tree .

$(window).load(function() {
	fadeout('#notice');
	fadeout('#alert');

	// Bindings
	$('.back_link').on('click', function(e) {
		e.preventDefault();
		show_element('#files_and_folders');
	});

	$('.permissions_link').on('click', function(e) {
		e.preventDefault();
		show_element('#permissions');
	});

	$('.clipboard_link').on('click', function(e) {
		e.preventDefault();
		show_element('#clipboard');
	});
});

function fadeout(element)
{
	if($(element) != undefined)
	{
		$(element).delay(1500).fadeOut('slow');
	}
}

function show_element(element)
{
	if($(element).is(':visible')) { element = '#files_and_folders'; }

	elements = ['#files_and_folders', '#permissions', '#clipboard'];
	elements.splice(elements.indexOf(element), 1);

	jQuery.each(elements, function(index, value) {
		if($(value) != undefined && $(value).is(':visible')) { $(value).slideUp('slow'); }
	});

	$(element).slideDown('slow');
	if($(element + '_link') != undefined) { $(element + '_link').removeClass('folder_menu').addClass('highlight'); }

	jQuery.each(elements, function(index, value) {
		if($(value + '_link') != undefined) { $(value + '_link').removeClass('highlight').addClass('folder_menu'); }
	});
}

function update_counter(element)
{
	$('#counter').html(element.value.length);
	$('#counter').css('color', element.value.length > 256 ? '#F00' : '#000');
}

{'fraction_non_alphanumeric': 0.24070175438596492, 'fraction_numerical': 0.009122807017543859, 'mean_word_length': 6.022167487684729, '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': '6014658', 'n_tokens_mistral': 1008, 'n_tokens_neox': 948, 'n_words': 137}