<commit_before>{% extends 'base.html' %}
{% load staticfiles %}
{% block content %}
<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>Chat Room{{ chat.pk }}</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script type="text/javascript" charset="utf-8">
        $(document).ready(function() {
            $('#newmessage').submit(function(e) {
                var message = $("#messageinput").val();
                $.ajax({
                    'type'     : 'POST',
                    'url'      : '/chat/add/{{chatroom.pk}}/',
                    'data'     : { 'message': message },
                    'dataType' : 'json',
                });
                $("#messageinput").val('');
                $("#messageinput").focus();
                e.preventDefault();
            });
            var longPoll = function() {
              return $.ajax({
                type: "POST",
                url: "/chat/show/{{chatroom.pk}}/",
                async: true,
                cache: false,
                timeout: 1000000,
                success: function(data) {
                  if (data.messages.length > 0) {
                      $("#messages").prepend($("<li>" + data.messages + "</li>"))
                  }
                  return longPoll();
                },
                dataType: 'json'
              });
            };
            longPoll();
        });
    </script>
</head>
<body>
<h1 id='room_title'>{{chatroom}}</h1>
<form id="newmessage">
        <input id="messageinput"></input>
</form>
<div id='chat_holder'>
    <div id='chat_window'>
        <ul id="messages">
            {% for message in messages %}
            <li>{{message}}</li>
            {% endfor %}
        </ul>
    </div>
    {% for queue in queues %}
    <p>{{queue}}</p>
    {% endfor %}
    <div id='room_info'>
        </button>
        Subscribrs for this room:
        {% for sub in subs %}
        <p>{{sub}}</p>
        {% endfor %}
        <br>
        Chat Rooms:
        {% for queue in queues %}
        <p>{{queue}}</p>
        {% endfor %}
        </body>
        {% if user.profile == chatroom.owner %}
            <a href='/chat/delete_room/{{chatroom.pk}}'><button>delete</button></a>
        {% endif %}
    </div>
</div>
{% endblock %}
</html><commit_msg>cleaning up html for chat rooms<commit_after>{% extends 'base.html' %}
{% load staticfiles %}
{% block content %}
<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>Chat Room{{ chat.pk }}</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script type="text/javascript" charset="utf-8">
        $(document).ready(function() {
            $('#newmessage').submit(function(e) {
                var message = $("#messageinput").val();
                $.ajax({
                    'type'     : 'POST',
                    'url'      : '/chat/add/{{chatroom.pk}}/',
                    'data'     : { 'message': message },
                    'dataType' : 'json',
                });
                $("#messageinput").val('');
                $("#messageinput").focus();
                e.preventDefault();
            });
            var longPoll = function() {
              return $.ajax({
                type: "POST",
                url: "/chat/show/{{chatroom.pk}}/",
                async: true,
                cache: false,
                timeout: 1000000,
                success: function(data) {
                  if (data.messages.length > 0) {
                      $("#messages").prepend($("<li>" + data.messages + "</li>"))
                  }
                  return longPoll();
                },
                dataType: 'json'
              });
            };
            longPoll();
        });
    </script>
</head>
<body>
<h1 id='room_title'>{{chatroom}}</h1>
<form id="newmessage">
        <input id="messageinput"></input>
</form>
<div id='chat_holder'>
    <div id='chat_window'>
        <ul id="messages">
            {% for message in messages %}
            <li>{{message}}</li>
            {% endfor %}
        </ul>
    </div>
    <div id='room_info'>
        </button>
        Subscribrs for this room:
        {% for sub in subs %}
        <p>{{sub}}</p>
        {% endfor %}
        <br>
        </body>
        {% if user.profile == chatroom.owner %}
            <a href='/chat/delete_room/{{chatroom.pk}}'><button>delete</button></a>
        {% endif %}
    </div>
</div>
{% endblock %}
</html>
{'fraction_non_alphanumeric': 0.18806548901335632, 'fraction_numerical': 0.006462731581214994, 'mean_word_length': 1.4618239660657477, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 89, 'https://': 2, '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': '6635973', 'n_tokens_mistral': 1438, 'n_tokens_neox': 1305, 'n_words': 256}