<commit_before>
console.log "Hello from slacks hacks!"

botify = (selector) ->
  selector.each (_, el) ->
    if $(el).find('.bot_label').length != 0
      $(el).addClass 'bot'

botAdder = (arg1, msg) ->
  botify($('[data-ts="' + msg.ts + '"]'))

botifyMessages = =>
  botify($('.message'))

# Botify the currently-viewed channel
botifyMessages()

# Attach .sent_by_me to messages sent by the current user
meAdder = (selector) ->
  selector.each (_, el) ->
    $(el).addClass 'sent_by_me'

sentByMeMessages = ->
  selector = '.message_sender[data-member-id=' + TS.boot_data.user_id + ']'
  messages = $(selector).closest('ts-message')
  messages.each (_, el) ->
    $(el).addClass 'sent_by_me'

addMultilineToMessages = ->
  $('.attachment_contents').each (_, el) ->
    selection = $(el)
    if selection.html().match(/<br>/)
      selection.closest('.content').first().addClass('multiline_attachment')

# replace slack hardcoded width/height with max width width/height
slackBuildImgDiv = TS.templates.builders.buildInlineImgDiv
TS.templates.builders.buildInlineImgDiv = (args...) ->
  result = slackBuildImgDiv(args...)
  width = result.match(/data-width="(\d+)"/)[1]
  max_width = TS.client.ui.$msgs_div.width() - 156
<commit_msg>A class name was changed<commit_after>
console.log "Hello from slacks hacks!"

botify = (selector) ->
  selector.each (_, el) ->
    if $(el).find('.bot_label').length != 0
      $(el).addClass 'bot'

botAdder = (arg1, msg) ->
  botify($('[data-ts="' + msg.ts + '"]'))

botifyMessages = =>
  botify($('.message'))

# Botify the currently-viewed channel
botifyMessages()

# Attach .sent_by_me to messages sent by the current user
meAdder = (selector) ->
  selector.each (_, el) ->
    $(el).addClass 'sent_by_me'

sentByMeMessages = ->
  selector = '.message_sender[data-member-id=' + TS.boot_data.user_id + ']'
  messages = $(selector).closest('ts-message')
  messages.each (_, el) ->
    $(el).addClass 'sent_by_me'

addMultilineToMessages = ->
  $('.attachment_flush_text').each (_, el) ->
    selection = $(el)
    if selection.html().match(/<br>/)
      selection.closest('.content').first().addClass('multiline_attachment')

# replace slack hardcoded width/height with max width width/height
slackBuildImgDiv = TS.templates.builders.buildInlineImgDiv
TS.templates.builders.buildInlineImgDiv = (args...) ->
  result = slackBuildImgDiv(args...)
  width = result.match(/data-width="(\d+)"/)[1]
  max_width = TS.client.ui.$msgs_div.width() - 156

{'fraction_non_alphanumeric': 0.18218460298266828, 'fraction_numerical': 0.0048367593712212815, 'mean_word_length': 3.973947895791583, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '227536', 'n_tokens_mistral': 863, 'n_tokens_neox': 838, 'n_words': 162}