<commit_before>{a, span} = React.DOM
tr = require '../utils/translate'

Dropdown = React.createFactory require './dropdown-view'
module.exports = React.createClass

  displayName: 'OpenInCodap'

  getDefaultProps: ->
    linkTitle: tr '~OPEN_IN_CODAP.TITLE'
    codapUrl: "http://codap.concord.org/releases/latest/static/dg/en/cert/index.html"
    openInNewWindow: true

  thisEncodedUrl: ->
    encodeURIComponent(window.location.toString())

  link: ->
    "#{@props.codapUrl}?di=#{@thisEncodedUrl()}"

  render: ->
    opts = { href: @link() }

    if @props.openInNewWindow
      opts.target = "_blank"<commit_msg>Add documentServer to `open-in-codap-view` link<commit_after>{a, span} = React.DOM
tr = require '../utils/translate'

Dropdown = React.createFactory require './dropdown-view'
module.exports = React.createClass

  displayName: 'OpenInCodap'

  getDefaultProps: ->
    linkTitle: tr '~OPEN_IN_CODAP.TITLE'
    codapUrl: "http://codap.concord.org/releases/latest/static/dg/en/cert/index.html"
    documentServer: "http://document-store.herokuapp.com/"
    openInNewWindow: true

  thisEncodedUrl: ->
    encodeURIComponent(window.location.toString())

  link: ->
    "#{@props.codapUrl}?documentServer=#{@props.documentServer}&di=#{@thisEncodedUrl()}"

  render: ->
    opts = { href: @link() }

    if @props.openInNewWindow
      opts.target = "_blank"
{'fraction_non_alphanumeric': 0.15631848064280496, 'fraction_numerical': 0.0, 'mean_word_length': 3.910394265232975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '1775178', 'n_tokens_mistral': 481, 'n_tokens_neox': 466, 'n_words': 73}