<commit_before>'use strict';

function repo_init(){
    core_repo_init({
      'events': {
        'fetch-keyinfo-key': {
          'onclick': fetch_keyinfo_key,
        },
        'fetch-keyinfo-keycode': {
          'onclick': fetch_keyinfo_keycode,
        },
        'generate': {
          'onclick': generate_list,
        },
      },
      'storage': {
        'base-keycode': 0,
        'key': 'H',
        'keycode': 72,
        'keycode-range': 1000,
      },
      'title': 'KeyInfo.htm',
    });

    document.getElementById('text').oninput = function(){
        // Fetch lowercase value.
        var value = this.value.toLowerCase();

        // Display length of inputted text.
        document.getElementById('length').innerHTML = value.length;

        // Reset characters.
        var characters = '0123456789abcdefghijklmnopqrstuvwxyz !@#$%^&*()_-+={}|:;"\'<,>.?/'.split('');
        var output = '';

        // Count how many times each character appears in inputted text.
        for(var character in characters){
            var character_count = value.replace(
              new RegExp(
                '[^' + characters[character] + ']',
                'g'// Global
              ),
              ''
            ).length;

            // Only display characters that appear in inputted text.
            if(character_count <= 0){
                continue;
            }

            output +=
              '<tr><td>'
              + characters[character]
              + '</td><td>'
              + character_count
              + '</td><td>'
              + ((character_count / value.length) * 100).toFixed(7)
              + '%</td></tr>';
        }

        core_html_modify({
          'id': 'characters',
          'properties': {
            'innerHTML': output,
          },
        });
    };
}<commit_msg>moved event binds to events arg<commit_after>'use strict';

function repo_init(){
    core_repo_init({
      'events': {
        'fetch-keyinfo-key': {
          'onclick': fetch_keyinfo_key,
        },
        'fetch-keyinfo-keycode': {
          'onclick': fetch_keyinfo_keycode,
        },
        'generate': {
          'onclick': generate_list,
        },
        'text': {
          'oninput': function(){
              // Fetch lowercase value.
              var value = this.value.toLowerCase();

              // Display length of inputted text.
              document.getElementById('length').innerHTML = value.length;

              // Reset characters.
              var characters = '0123456789abcdefghijklmnopqrstuvwxyz !@#$%^&*()_-+={}|:;"\'<,>.?/'.split('');
              var output = '';

              // Count how many times each character appears in inputted text.
              for(var character in characters){
                  var character_count = value.replace(
                    new RegExp(
                      '[^' + characters[character] + ']',
                      'g'// Global
                    ),
                    ''
                  ).length;

                  // Only display characters that appear in inputted text.
                  if(character_count <= 0){
                      continue;
                  }

                  output +=
                    '<tr><td>'
                    + characters[character]
                    + '</td><td>'
                    + character_count
                    + '</td><td>'
                    + ((character_count / value.length) * 100).toFixed(7)
                    + '%</td></tr>';
              }

              core_html_modify({
                'id': 'characters',
                'properties': {
                  'innerHTML': output,
                },
              });
          },
        },
      },
      'storage': {
        'base-keycode': 0,
        'key': 'H',
        'keycode': 72,
        'keycode-range': 1000,
      },
      'title': 'TextInfo.htm',
    });
}
{'fraction_non_alphanumeric': 0.14293006636038796, 'fraction_numerical': 0.011230219499744768, 'mean_word_length': 1.2458452722063038, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 21, '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': '1003416', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1019, 'n_words': 204}