<commit_before>class window.FactBottomView extends Backbone.Marionette.ItemView
  className: 'fact-bottom bottom-base'

  template: 'facts/bottom_base'

  events:
    "click .js-add-to-channel": "showAddToChannel",
    "click .js-start-conversation": "showStartConversation"
    "click .js-open-proxy-link" : "openProxyLink"

  templateHelpers: ->
    showTime: true
    showRepost: true
    showShare: true
    showSubComments: false
    showFactInfo: true
    showDiscussion: true
    fact_url_host: ->
      new Backbone.Factlink.Url(@fact_url).host() if @fact_url?

  showAddToChannel: (e) ->
    e.preventDefault()
    e.stopPropagation()

    collection = @model.getOwnContainingChannels(this)
    collection.on "add", (channel) =>
      @model.addToChannel channel, {}

    collection.on "remove", (channel) =>
      @model.removeFromChannel channel, {}
      if window.currentChannel and currentChannel.get("id") is channel.get("id")
        @model.collection.remove @model
        FactlinkApp.Modal.close()

    FactlinkApp.Modal.show 'Repost Factlink',
      new AddToChannelModalView(collection: collection, model: @model)

  showStartConversation: (e) ->
    e.preventDefault()
    e.stopPropagation()

    FactlinkApp.Modal.show 'Send a message',
      new StartConversationView(model: @model)

  openProxyLink: (e) ->
    mp_track "Factlink: Open proxy link",
      site_url: @model.get("fact_url")

<commit_msg>This one is not needed here<commit_after>class window.FactBottomView extends Backbone.Marionette.ItemView
  className: 'fact-bottom bottom-base'

  template: 'facts/bottom_base'

  events:
    "click .js-add-to-channel": "showAddToChannel"
    "click .js-start-conversation": "showStartConversation"
    "click .js-open-proxy-link" : "openProxyLink"

  templateHelpers: ->
    showTime: true
    showRepost: true
    showShare: true
    showSubComments: false
    showFactInfo: true
    showDiscussion: true
    fact_url_host: ->
      new Backbone.Factlink.Url(@fact_url).host() if @fact_url?

  showAddToChannel: (e) ->
    e.preventDefault()
    e.stopPropagation()

    collection = @model.getOwnContainingChannels(this)
    collection.on "add", (channel) =>
      @model.addToChannel channel, {}

    collection.on "remove", (channel) =>
      @model.removeFromChannel channel, {}
      if window.currentChannel and currentChannel.get("id") is channel.get("id")
        @model.collection.remove @model
        FactlinkApp.Modal.close()

    FactlinkApp.Modal.show 'Repost Factlink',
      new AddToChannelModalView(collection: collection, model: @model)

  showStartConversation: (e) ->
    e.preventDefault()
    e.stopPropagation()

    FactlinkApp.Modal.show 'Send a message',
      new StartConversationView(model: @model)

  openProxyLink: (e) ->
    mp_track "Factlink: Open proxy link",
      site_url: @model.get("fact_url")


{'fraction_non_alphanumeric': 0.12041884816753927, 'fraction_numerical': 0.0, 'mean_word_length': 3.5782747603833864, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 17, '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': '3397002', 'n_tokens_mistral': 916, 'n_tokens_neox': 890, 'n_words': 185}