<commit_before>/* eslint-disable no-console */
window.Dropzone.autoDiscover = false;
const myDropzone = new window.Dropzone('#mainDz');

myDropzone.on('complete', (file) => {
	const response = JSON.parse(file.xhr.response);

	try {
		copyTextToClipboard(response.url);
	} catch (error) {
		console.warn('cannot_copy');
		console.warn(error);
	}
});

function copyTextToClipboard(text) {
	const textArea = document.createElement('textarea');

	textArea.style.position = 'fixed';
	textArea.style.top = 0;
	textArea.style.left = 0;
	textArea.style.width = '2em';
	textArea.style.height = '2em';
	textArea.style.padding = 0;
	textArea.style.border = 'none';
	textArea.style.outline = 'none';
	textArea.style.boxShadow = 'none';
	textArea.style.background = 'transparent';
	textArea.value = text;

	document.body.appendChild(textArea);

	textArea.select();

	try {
		document.execCommand('copy');
	} catch (error) {
		console.warn(error);
	}

	document.body.removeChild(textArea);
}<commit_msg>updated js<commit_after>/* eslint-disable no-console */
window.Dropzone.autoDiscover = false;
const myDropzone = new window.Dropzone('#mainDz');

myDropzone.on('complete', (file) => {
	const response = JSON.parse(file.xhr.response);

	copyTextToClipboard(response.url);
});

function copyTextToClipboard(text) {
	const textArea = document.createElement('textarea');

	textArea.style.position = 'fixed';
	textArea.style.top = 0;
	textArea.style.left = 0;
	textArea.style.width = '2em';
	textArea.style.height = '2em';
	textArea.style.padding = 0;
	textArea.style.border = 'none';
	textArea.style.outline = 'none';
	textArea.style.boxShadow = 'none';
	textArea.style.background = 'transparent';

	textArea.value = text;

	document.body.appendChild(textArea);

	textArea.select();

	try {
		const successful = document.execCommand('copy');

		console.info(successful);
	} catch (error) {
		console.warn(error);
	}

	document.body.removeChild(textArea);
}
{'fraction_non_alphanumeric': 0.15824742268041236, 'fraction_numerical': 0.005154639175257732, 'mean_word_length': 4.9907407407407405, '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': '1409843', 'n_tokens_mistral': 695, 'n_tokens_neox': 663, 'n_words': 109}