<commit_before>/* global */
javascript: (function () {
  var member = ['Rplus', 'whalesingswee', 'amazingandyyy', 'Clementtang', 'erwaiyang'];

  var weight = {
    likes: 1,      /* 互動基數 */
    comments: 1.5, /* 鼓勵討論 */
    shares: 2,     /* 鼓勵擴散 */
    vote: 3        /* 些微調整 */
  };

  var comments = [].slice.call(document.querySelectorAll('.timeline-comment-wrapper'));

  var targetComments = comments.filter((comment) => {
    var firstTd = comment.querySelector('tbody td');
    return !!firstTd && /^\# \d+/.test(firstTd.textContent);
  });

  var emojisData = targetComments.map((t) => {
    var reactionBtn = [].slice.call(t.querySelectorAll('.comment-reactions-options .reaction-summary-item'));

    return reactionBtn.map((btn) => {
      return {
        reaction: btn.value.split(/\s+/)[0],
        who: btn.getAttribute('aria-label').split(' reacted with')[0].replace(/,| and/g, '').split(/\s+/)
      };
    });
  });

  var sumTable = emojisData.map((emojis, idx) => {<commit_msg>在統計時，把 avatar 縮圖塞進 button 裡~ (#58)<commit_after>/* global */
javascript: (function () {
  var member = ['Rplus', 'whalesingswee', 'amazingandyyy', 'Clementtang', 'erwaiyang'];

  var weight = {
    likes: 1,      /* 互動基數 */
    comments: 1.5, /* 鼓勵討論 */
    shares: 2,     /* 鼓勵擴散 */
    vote: 3        /* 些微調整 */
  };

  var comments = [].slice.call(document.querySelectorAll('.timeline-comment-wrapper'));

  var targetComments = comments.filter((comment) => {
    var firstTd = comment.querySelector('tbody td');
    return !!firstTd && /^\# \d+/.test(firstTd.textContent);
  });

  var emojisData = targetComments.map((t) => {
    var reactionBtn = [].slice.call(t.querySelectorAll('.comment-reactions-options .reaction-summary-item'));

    var avatarBoxStyle = document.getElementById('customAvatarBoxStyle');
    if (!avatarBoxStyle) {
      var style = document.createElement('style');
      style.id = 'customAvatarBoxStyle';
      style.innerHTML = '.customAvatarBox img {width: 20px; height: 20px; vertical-align: top; margin-left: 3px; border-radius: 3px;}';
      document.head.appendChild(style);
    }

    return reactionBtn.map((btn) => {
      var who = btn.getAttribute('aria-label').split(' reacted with')[0].replace(/,| and/g, '').split(/\s+/);

      var avatarBox = document.createElement('span');
      avatarBox.className = 'customAvatarBox';
      avatarBox.innerHTML = who.map((uid) => `<img src="https://github.com/${uid}.png">`).join('');
      btn.appendChild(avatarBox);

      return {
        reaction: btn.value.split(/\s+/)[0],
        who: who
      };
    });
  });

  var sumTable = emojisData.map((emojis, idx) => {
{'fraction_non_alphanumeric': 0.19223520542781755, 'fraction_numerical': 0.008292499057670561, 'mean_word_length': 3.108359133126935, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 13, 'https://': 1, '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': '6116897', 'n_tokens_mistral': 959, 'n_tokens_neox': 937, 'n_words': 162}