<commit_before>%html
  %head
    %link(href="stylesheet.css" rel="stylesheet" type="text/css")
    %script(src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js")
    %script{ :src => cometio_js }

    %script(src="/json2.js" type="text/javascript")
  %body
    %a#unfocus{:href => "#"}

    :javascript
      if (typeof console === "undefined") {
        console = { log: function() {} };
      }

      function updateSection(section) {
        console.log('updateSection', section);
        var url = '/' + section;
        var jqxhr = $.get(url);
        jqxhr.done(function (data, textStatus, jqXHR) {
          console.log('success');
          $('#' + section).replaceWith(data);
        });
        jqxhr.fail(function (data, textStatus, jqXHR) {
          alert('ajax failure ' + url);
        });
      }

      var io = new CometIO().connect();<commit_msg>Avoid error from console.log on old browser<commit_after>%html
  %head
    %link(href="stylesheet.css" rel="stylesheet" type="text/css")

    %script(src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js")
    %script{ :src => cometio_js }
    %script(src="/console-log-polyfill.js")
    %script(src="/json2.js" type="text/javascript")
  %body
    %a#unfocus{:href => "#"}

    :javascript
      if (typeof console === "undefined") {
        console = { log: function() {} };
      }

      function updateSection(section) {
        console.log('updateSection', section);
        var url = '/' + section;
        var jqxhr = $.get(url);
        jqxhr.done(function (data, textStatus, jqXHR) {
          console.log('success');
          $('#' + section).replaceWith(data);
        });
        jqxhr.fail(function (data, textStatus, jqXHR) {
          alert('ajax failure ' + url);
        });
      }

      var io = new CometIO().connect();
{'fraction_non_alphanumeric': 0.1799781181619256, 'fraction_numerical': 0.00437636761487965, 'mean_word_length': 2.4705882352941178, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2797798', 'n_tokens_mistral': 602, 'n_tokens_neox': 587, 'n_words': 102}