<commit_before>(function () {

var enabled = reportConfig.REPORTS;
var captchaTimeout = 5 * 60 * 1000;
var REPORTS = {};
var PANEL;

if (enabled)
	menuOptions.push('Report');

var captchaURL = '/captcha/';

var Report = Backbone.Model.extend({
	defaults: {
		status: 'setup',
		hideAfter: true,
		captchaID: '',
	},

	request_new: function () {
		var self = this;
		$.ajax({
			url: captchaURL,
			success: renderCaptcha,
			error: handleLoadError,
		});
		self.set('status', 'ready');

		if (this.get('timeout'))
			clearTimeout(this.get('timeout'));

		this.set('timeout', setTimeout(function () {
			self.set({
				timeout: 0,
				status: 'error',
				error: 'Captcha timed out',
			});
		}, captchaTimeout));


		function renderCaptcha(captcha) {
			var captchaDiv = document.getElementById('captcha');
			var form = document.createElement('form');
			form.method = 'post';
			form.class = 'captchouli-width captchouli-form';
			form.style = 'font-family: Sans-Serif';
			form.innerHTML = captcha;
			self.set('captchaID', form['captchouli-id'].value)
			form.addEventListener('submit', handleSubmit);
			captchaDiv.innerHTML = '';
			captchaDiv.appendChild(form);
		}
		function handleLoadError() {
			self.set({
				status: 'error',
				error: 'Couldn\'t load captcha.',
			})
		}
		function handleSubmitError() {
			self.set({
				status: 'error',
				error: 'Couldn\'t submit solution.',
			})
		}
		function handleSubmit(event) {
			event.preventDefault();
			var formData = $(event.target).serialize();
			$.ajax({
				url: captchaURL,
				type: 'POST',
				data: formData,
				processData: false,
				contentType: 'application/x-www-form-urlencoded',
				success: handleResponse,
				error: handleSubmitError
			});<commit_msg>Attempting to fix scaling issues.<commit_after>(function () {

var enabled = reportConfig.REPORTS;
var captchaTimeout = 5 * 60 * 1000;
var REPORTS = {};
var PANEL;

if (enabled)
	menuOptions.push('Report');

var captchaURL = '/captcha/';

var Report = Backbone.Model.extend({
	defaults: {
		status: 'setup',
		hideAfter: true,
		captchaID: '',
	},

	request_new: function () {
		var self = this;
		$.ajax({
			url: captchaURL,
			success: renderCaptcha,
			error: handleLoadError,
		});
		self.set('status', 'ready');

		if (this.get('timeout'))
			clearTimeout(this.get('timeout'));

		this.set('timeout', setTimeout(function () {
			self.set({
				timeout: 0,
				status: 'error',
				error: 'Captcha timed out',
			});
		}, captchaTimeout));


		function renderCaptcha(captcha) {
			var captchaDiv = document.getElementById('captcha');
			var form = document.createElement('form');
			form.method = 'post';
			form.class = 'captchouli-width captchouli-form';
			form.style = 'font-family: Sans-Serif';
			form.innerHTML = captcha;
			self.set('captchaID', form['captchouli-id'].value)
			form.addEventListener('submit', handleSubmit);
			captchaDiv.innerHTML = '';
			captchaDiv.appendChild(form);
			$('captchouli-width').width($('.captchouli-img').width()*3+12) // must happen first
			$('input.captchouli-width').width($('.captchouli-img').width()*3-12)
		}
		function handleLoadError() {
			self.set({
				status: 'error',
				error: 'Couldn\'t load captcha.',
			})
		}
		function handleSubmitError() {
			self.set({
				status: 'error',
				error: 'Couldn\'t submit solution.',
			})
		}
		function handleSubmit(event) {
			event.preventDefault();
			var formData = $(event.target).serialize();
			$.ajax({
				url: captchaURL,
				type: 'POST',
				data: formData,
				processData: false,
				contentType: 'application/x-www-form-urlencoded',
				success: handleResponse,
				error: handleSubmitError
			});
{'fraction_non_alphanumeric': 0.16470588235294117, 'fraction_numerical': 0.006019151846785226, 'mean_word_length': 3.663265306122449, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5476126', 'n_tokens_mistral': 1475, 'n_tokens_neox': 1205, 'n_words': 249}