<commit_before>$(document).on('click', '.js-notice-read_all', function(){
	if (!get_uid()) return false;
	var postUri = 'notice/api/read_all';
	var $selfObj = $(this);
	$.ajax({
		url : get_url(postUri),
		type : 'POST',
		dataType : 'json',
		data : set_token(),
		timeout: get_config('default_ajax_timeout'),
		beforeSend: function(xhr, settings) {
			GL.execute_flg = true;
			$selfObj.attr('disabled', true);
			//$selfObj.html(get_loading_image_tag());
		},
		complete: function(xhr, textStatus) {
			GL.execute_flg = false;
			$selfObj.attr('disabled', false);
		},
		success: function(result){
			if (result.updated_count > 0) {
				var messageDefault = get_term('already_read') + 'にしました。';
				showMessage(result.message, messageDefault);
				changeViewToRead();
			}
		},
		error: function(result){
			showErrorMessage(result, '変更にに失敗しました。');
		}
	});
	return false;
});

function changeViewToRead() {
	var changedReadState = get_term('already_read');<commit_msg>Fixed type on js file<commit_after>$(document).on('click', '.js-notice-read_all', function(){
	if (!get_uid()) return false;
	var postUri = 'notice/api/read_all';
	var $selfObj = $(this);
	$.ajax({
		url : get_url(postUri),
		type : 'POST',
		dataType : 'json',
		data : set_token(),
		timeout: get_config('default_ajax_timeout'),
		beforeSend: function(xhr, settings) {
			GL.execute_flg = true;
			$selfObj.attr('disabled', true);
			//$selfObj.html(get_loading_image_tag());
		},
		complete: function(xhr, textStatus) {
			GL.execute_flg = false;
			$selfObj.attr('disabled', false);
		},
		success: function(result){
			if (result.updated_count > 0) {
				var messageDefault = get_term('already_read') + 'にしました。';
				showMessage(result.message, messageDefault);
				changeViewToRead();
			}
		},
		error: function(result){
			showErrorMessage(result, '変更に失敗しました。');
		}
	});
	return false;
});

function changeViewToRead() {
	var changedReadState = get_term('already_read');
{'fraction_non_alphanumeric': 0.17119425935417734, 'fraction_numerical': 0.0010251153254741158, 'mean_word_length': 4.6579710144927535, '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': '4435579', 'n_tokens_mistral': 776, 'n_tokens_neox': 689, 'n_words': 127}