<commit_before>$(function() {

  var snorky = new Snorky(SockJS, "/sockjs", {
    "messaging": Snorky.Messaging
  }, true);

  var messaging = snorky.services.messaging;

  $("#frmRegister").submit(function(ev) {
    ev.preventDefault();

    messaging.registerParticipant({
      name: $("#txtParticipantName").val()
    }).then(function() {
      $("#statusRegister").text("Successfully registered");
    }, function(err) {
      $("#statusRegister").text("Register error: " + err.message);
    });
  });

  $("#btnUnregister").click(function() {
    messaging.unregisterParticipant({
      name: $("#txtParticipantName").val()
    }).then(function() {
      $("#statusRegister").text("Successfully unregistered");
    }, function(err) {
      $("#statusRegister").text("Unregister error: " + err.message);
    });
  });

  $("#btnListParticipants").click(function() {
    messaging.listParticipants({}).then(function(participants) {
      $("#ulParticipants").empty();
      $.each(participants, function(i, participant) {
        $("#ulParticipants").append($("<li/>", { text: participant }));
      });
      $("#statusParticipants").text("Participants listed");<commit_msg>Make chat demo variables available for debugging<commit_after>var snorky, messaging;

$(function() {

  snorky = new Snorky(SockJS, "/sockjs", {
    "messaging": Snorky.Messaging
  }, true);

  messaging = snorky.services.messaging;

  $("#frmRegister").submit(function(ev) {
    ev.preventDefault();

    messaging.registerParticipant({
      name: $("#txtParticipantName").val()
    }).then(function() {
      $("#statusRegister").text("Successfully registered");
    }, function(err) {
      $("#statusRegister").text("Register error: " + err.message);
    });
  });

  $("#btnUnregister").click(function() {
    messaging.unregisterParticipant({
      name: $("#txtParticipantName").val()
    }).then(function() {
      $("#statusRegister").text("Successfully unregistered");
    }, function(err) {
      $("#statusRegister").text("Unregister error: " + err.message);
    });
  });

  $("#btnListParticipants").click(function() {
    messaging.listParticipants({}).then(function(participants) {
      $("#ulParticipants").empty();
      $.each(participants, function(i, participant) {
        $("#ulParticipants").append($("<li/>", { text: participant }));
      });
      $("#statusParticipants").text("Participants listed");
{'fraction_non_alphanumeric': 0.20506434205064342, 'fraction_numerical': 0.0, 'mean_word_length': 4.073684210526316, 'pattern_counts': {'":': 2, '<': 5, '<?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': '7455081', 'n_tokens_mistral': 724, 'n_tokens_neox': 688, 'n_words': 98}