<commit_before>/*global jQuery,cyberDojo*/

var cyberDojo = (function(cd, $) {
  "use strict";

  var startDialog = function(id, avatarName, dialogHtml, from) {
    var url = '/kata/edit/' + id + '?avatar=' + avatarName;
    var okOrCancel = function() {
      if (from == 'from_setup') {
        window.location = cd.homePageUrl(id);
      }
      window.open(url);
    };
    $('<div class="dialog">')
      .html(dialogHtml)
      .dialog({
        title: cd.dialogTitle('start programming'),
        autoOpen: true,
        width: 400,
        modal: true,
        closeOnEscape: true,
        close: function() { okOrCancel(); $(this).remove(); },
        buttons: { ok: function() { okOrCancel(); $(this).remove(); } }
      });
  };

  cd.startAnimal = function(id, from) {
    $.getJSON('/enter/start', { id: id }, function(dojo) {
      if (dojo.full) {
        cd.dialog(dojo.full_dialog_html, 'start coding', 'ok').dialog('open');
      } else {
        startDialog(id, dojo.avatar_name, dojo.start_dialog_html, from);
      }
    });
  };

  return cd;
})(cyberDojo || {}, jQuery);
<commit_msg>used word 'programming' rather than 'coding' in dojo-full dialog for consistency<commit_after>/*global jQuery,cyberDojo*/

var cyberDojo = (function(cd, $) {
  "use strict";

  cd.startAnimal = function(id, from) {
    $.getJSON('/enter/start', { id: id }, function(dojo) {
      if (dojo.full) {
        cd.dialog(dojo.full_dialog_html, 'start programming', 'ok').dialog('open');
      } else {
        startDialog(id, dojo.avatar_name, dojo.start_dialog_html, from);
      }
    });
  };

  var startDialog = function(id, avatarName, dialogHtml, from) {
    var url = '/kata/edit/' + id + '?avatar=' + avatarName;
    var okOrCancel = function() {
      if (from == 'from_setup') {
        window.location = cd.homePageUrl(id);
      }
      window.open(url);
    };
    $('<div class="dialog">')
      .html(dialogHtml)
      .dialog({
        title: cd.dialogTitle('start programming'),
        autoOpen: true,
        width: 400,
        modal: true,
        closeOnEscape: true,
        close: function() { okOrCancel(); $(this).remove(); },
        buttons: { ok: function() { okOrCancel(); $(this).remove(); } }
      });
  };

  return cd;
})(cyberDojo || {}, jQuery);

{'fraction_non_alphanumeric': 0.17819614711033274, 'fraction_numerical': 0.002626970227670753, 'mean_word_length': 2.638535031847134, 'pattern_counts': {'":': 0, '<': 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': '5104006', 'n_tokens_mistral': 768, 'n_tokens_neox': 745, 'n_words': 158}