<commit_before>{% extends "base.html" %}

{% block content %}
	<div id="chat_box">
		<div class="panel panel-default">
			 <div class="panel-heading">Trollbox</div>
			 <div class="panel-body overlay" id="chat_messages">
			    <div id="spinner"></div>
			    <ul class="chat" id="chat_window">
			    </ul>
			 </div>
			 <div class="panel-footer">
				<div class="input-group">
					<input id="chat_field" type="text" class="form-control input-sm" placeholder="Saisir le message ici..." />
					<span class="input-group-btn">
					    <button class="btn btn-warning btn-sm" id="btn-chat">
						Envoyer
					</button>
					</span>
				</div>
			 </div>
		 </div>
	</div>
	<script>
	$(document).ready(function(){
	    var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port + '/chat_ws',{'sync disconnect on unload': true });

	    // Function that send message using WebSocket
	    function send_message() {
		socket.emit('chat_message', { data: $('#chat_field').val() });
		$('#chat_field').val('')
      	    }

	    // Message reception
            socket.on('message', function(data) {

		// Remove the spinner
		$("#spinner").remove()

		$("#chat_window").append('<li tabindex="1" class="right clearfix"><span class="chat-img pull-left"><img src="/static/avatars/' + data.avatar + '" alt="User Avatar" class="img-circle" height="40" width="40" /></span><div class="chat-body clearfix"><div class="header"><strong class="primary-font">' + data.user + '</strong> <small class="text-muted"><span class="glyphicon glyphicon-time"></span>' + data.date + '</small></div><p>' + data.msg +'</p></div></li>');

		$('li').last().addClass('active-li').focus();
		$('#chat_field').focus();
		$('#chat_messages').removeClass("overlay")
            });

	    // Message send from the input field when enter key is pressed
	    $('#chat_field').on('keypress', function (e) {
	         if(e.which === 13){
			send_message()
         	}
            }); <commit_msg>Fix text alignement issue on chat window<commit_after>{% extends "base.html" %}

{% block content %}
	<div id="chat_box">
		<div class="panel panel-default">
			 <div class="panel-heading">Trollbox</div>
			 <div class="panel-body overlay" id="chat_messages">
			    <div id="spinner"></div>
			    <ul class="chat" id="chat_window">
			    </ul>
			 </div>
			 <div class="panel-footer">
				<div class="input-group">
					<input id="chat_field" type="text" class="form-control input-sm" placeholder="Saisir le message ici..." />
					<span class="input-group-btn">
					    <button class="btn btn-warning btn-sm" id="btn-chat">
						Envoyer
					</button>
					</span>
				</div>
			 </div>
		 </div>
	</div>
	<script>
	$(document).ready(function(){
	    var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port + '/chat_ws',{'sync disconnect on unload': true });

	    // Function that send message using WebSocket
	    function send_message() {
		socket.emit('chat_message', { data: $('#chat_field').val() });
		$('#chat_field').val('')
      	    }

	    // Message reception
            socket.on('message', function(data) {

		// Remove the spinner
		$("#spinner").remove()

		$("#chat_window").append('<li tabindex="1" class="right clearfix"><div class="media"><div class="chat-img media-left"><img src="/static/avatars/' + data.avatar + '" alt="User Avatar" class="img-circle" height="40" width="40" /></div><div class="media-body clearfix"><div class="header"><strong class="primary-font">' + data.user + '</strong> <small class="text-muted"><span class="glyphicon glyphicon-time"></span>' + data.date + '</small></div><p>' + data.msg +'</p></div></div></li>');

		$('li').last().addClass('active-li').focus();
		$('#chat_field').focus();
		$('#chat_messages').removeClass("overlay")
            });

	    // Message send from the input field when enter key is pressed
	    $('#chat_field').on('keypress', function (e) {
	         if(e.which === 13){
			send_message()
         	}
            }); 
{'fraction_non_alphanumeric': 0.21251241310824232, 'fraction_numerical': 0.003475670307845084, 'mean_word_length': 3.327604726100967, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 83, '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': '939290', 'n_tokens_mistral': 1422, 'n_tokens_neox': 1241, 'n_words': 267}