<commit_before>ReactFactBody = React.createBackboneClass
  render: ->
    _a ["fact-body-displaystring-clickable",
        href: @model().get('proxy_open_url'),
        target: '_blank'],
      @model().get('displaystring')

ReactFactBase = React.createBackboneClass
  render: ->
    _div ['fact-base'],
      _div ['fact-body'],
        ReactFactBody
          model: @model()

ReactProxyLink = React.createBackboneClass
  _onClick: ->
    mp_track "Factlink: Open proxy link",
      site_url: @model().get("fact_url")

  render: ->
    fact_url_host = @model().factUrlHost()

    _div ['proxy-link-container'],
      _div ['proxy-link-box'],
        _a ["proxy-link",
            href: @model().get("proxy_open_url"),
            target:"_blank",
            onClick: @_onClick],
          _img ["proxy-link-favicon",
                src:"https://www.google.com/s2/u/0/favicons?domain=#{fact_url_host}"],
            @model().factUrlTitle()
      _i ["proxy-link-overflow"]

window.ReactFact = React.createBackboneClass
  render: ->
    _div ['fact-view'],
      _div ["js-fact-base-region"],
        ReactFactBase(model: @model())
      _div ["js-fact-link-region"],
         ReactProxyLink(model: @model())<commit_msg>Removed no longer needed regions<commit_after>ReactFactBody = React.createBackboneClass
  render: ->
    _a ["fact-body-displaystring-clickable",
        href: @model().get('proxy_open_url'),
        target: '_blank'],
      @model().get('displaystring')

ReactFactBase = React.createBackboneClass
  render: ->
    _div ['fact-base'],
      _div ['fact-body'],
        ReactFactBody
          model: @model()

ReactProxyLink = React.createBackboneClass
  _onClick: ->
    mp_track "Factlink: Open proxy link",
      site_url: @model().get("fact_url")

  render: ->
    fact_url_host = @model().factUrlHost()

    _div ['proxy-link-container'],
      _div ['proxy-link-box'],
        _a ["proxy-link",
            href: @model().get("proxy_open_url"),
            target:"_blank",
            onClick: @_onClick],
          _img ["proxy-link-favicon",
                src:"https://www.google.com/s2/u/0/favicons?domain=#{fact_url_host}"],
            @model().factUrlTitle()
      _i ["proxy-link-overflow"]

window.ReactFact = React.createBackboneClass
  render: ->
    _div ['fact-view'],
      ReactFactBase(model: @model())
      ReactProxyLink(model: @model())
{'fraction_non_alphanumeric': 0.16177703269069574, 'fraction_numerical': 0.0016764459346186086, 'mean_word_length': 2.7296875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '6528108', 'n_tokens_mistral': 760, 'n_tokens_neox': 765, 'n_words': 125}