<commit_before>var client =
{
	bpm: 60,
	range: -1,
	ranges: ["low", "mid", "high"],
	levelScaleFactors: [ 1.75, 2.5, 4.0 ],
	levelPeakFactors: [ 0.1, 0.2, 0.15 ],
	levelSelectors: [ null, null, null ],
	webSocket: null
};

client.init = function ()
{
	$("body").on("keydown", function(e) 
	{
		switch (e.keyCode) 
		{
			case 70: // [F] - fullscreen
				client.toggleFullScreen();
				break;
			case 76: // [L]
				client.setRange(0);
				break;
			case 77: // [M]
				client.setRange(1);
				break;
			case 72: // [H]
				client.setRange(2);
				break;
			case 65: // [A]
				client.setRange(-1);
				break;
			default:
				break;
		}
	});
	
	$("section").on("pointerdown", function (e)
	{
		client.setRange((client.range == -1) ? client.ranges.indexOf(e.currentTarget.id) : -1);
	});
	
	$(".level").velocity({ scale: 1 }, { duration: 0 });
	$(".tempo").velocity({ scale: 0 }, { duration: 0 });

	client.levelSelectors[0] = $("#low .level");
	client.levelSelectors[1] = $("#mid .level");
	client.levelSelectors[2] = $("#high .level");
	
	client.startTempo();
	
	if (client.isSimulationEnabled)
	{
		client.runSimulation();
	}
	else
	{
		client.connectWebSocket();
	}
};

client.connectWebSocket = function()
{
	$(client.webSocket).off();
	
	client.webSocket = new WebSocket("ws://" + window.document.location.host.replace(/:.*/, ""));
	
	client.webSocket.onmessage = function(e) 
	{
		try 
		{
			client.processMessage(JSON.parse(e.data));
		}
		catch (e) { }
	};
	
	client.webSocket.onclose = function(e) 
	{
		var timeout = (Math.floor(Math.random() * (30 - 15)) + 15) * 1000;
		setTimeout(client.connectWebSocket, timeout);
	};
};
<commit_msg>Remove leftover dead code on client side<commit_after>var client =
{
	bpm: 60,
	range: -1,
	ranges: ["low", "mid", "high"],
	levelScaleFactors: [ 1.75, 2.5, 4.0 ],
	levelPeakFactors: [ 0.1, 0.2, 0.15 ],
	levelSelectors: [ null, null, null ],
	webSocket: null
};

client.init = function ()
{
	$("body").on("keydown", function(e) 
	{
		switch (e.keyCode) 
		{
			case 70: // [F] - fullscreen
				client.toggleFullScreen();
				break;
			case 76: // [L]
				client.setRange(0);
				break;
			case 77: // [M]
				client.setRange(1);
				break;
			case 72: // [H]
				client.setRange(2);
				break;
			case 65: // [A]
				client.setRange(-1);
				break;
			default:
				break;
		}
	});
	
	$("section").on("pointerdown", function (e)
	{
		client.setRange((client.range == -1) ? client.ranges.indexOf(e.currentTarget.id) : -1);
	});
	
	$(".level").velocity({ scale: 1 }, { duration: 0 });
	$(".tempo").velocity({ scale: 0 }, { duration: 0 });

	client.levelSelectors[0] = $("#low .level");
	client.levelSelectors[1] = $("#mid .level");
	client.levelSelectors[2] = $("#high .level");
	
	client.startTempo();
	
	client.connectWebSocket();
};

client.connectWebSocket = function()
{
	$(client.webSocket).off();
	
	client.webSocket = new WebSocket("ws://" + window.document.location.host.replace(/:.*/, ""));
	
	client.webSocket.onmessage = function(e) 
	{
		try 
		{
			client.processMessage(JSON.parse(e.data));
		}
		catch (e) { }
	};
	
	client.webSocket.onclose = function(e) 
	{
		var timeout = (Math.floor(Math.random() * (30 - 15)) + 15) * 1000;
		setTimeout(client.connectWebSocket, timeout);
	};
};

{'fraction_non_alphanumeric': 0.2098613251155624, 'fraction_numerical': 0.030816640986132512, 'mean_word_length': 3.1829896907216493, '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': '5133985', 'n_tokens_mistral': 1454, 'n_tokens_neox': 1221, 'n_words': 230}