<commit_before>document.addEventListener('DOMContentLoaded', function(){	
  if (window.crypto && window.crypto.getRandomValues) {
		// form ready
		var message = document.getElementById("message");
		var ciphertext = document.getElementById("ciphertext");				
		// encrypt on the fly
		message.addEventListener("input", function(){
			ciphertext.style.display = "block";			
			ciphertext.value = cleanup(encrypt(message.value));			
		});		
		// encrypt on submit
		document.forms[0].addEventListener("submit", function(evt){
		  if( form.elements['message'].value == '') {
		    evt.preventDefault();
		    alert('Please enter a message!');
		  } else {
		  	form.elements['message'].value = encrypt(message.value);
				return true
		  }
		});		    
  } else {
		// not ready
		document.getElementById("button").disabled = true;<commit_msg>focus on input field<commit_after>document.addEventListener('DOMContentLoaded', function(){	
  if (window.crypto && window.crypto.getRandomValues) {
		// form ready
		document.getElementById("name").focus();
		var message = document.getElementById("message");
		var ciphertext = document.getElementById("ciphertext");				
		// encrypt on the fly
		message.addEventListener("input", function(){
			ciphertext.style.display = "block";			
			ciphertext.value = cleanup(encrypt(message.value));			
		});		
		// encrypt on submit
		document.forms[0].addEventListener("submit", function(evt){
		  if( form.elements['message'].value == '') {
		    evt.preventDefault();
		    alert('Please enter a message!');
		  } else {
		  	form.elements['message'].value = encrypt(message.value);
				return true
		  }
		});		    
  } else {
		// not ready
		document.getElementById("button").disabled = true;
{'fraction_non_alphanumeric': 0.15202312138728324, 'fraction_numerical': 0.0011560693641618498, 'mean_word_length': 3.7166212534059944, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5169293', 'n_tokens_mistral': 557, 'n_tokens_neox': 468, 'n_words': 93}