<commit_before>ZeroClipboard.config(moviePath: asset_path("ZeroClipboard.swf"))
clip = new ZeroClipboard($('#copyButton').get(0))

clip.on 'mouseover', ->
  $(this).attr('data-clipboard-text', $('.reference textarea').text())

clip.on 'complete', (event) ->
  $(".reference textarea").focus()
  $(".reference textarea").select()
  $(this).addClass("btn-success")
  $(this).text("Copied to clipboard")

clip.on 'mouseout', ->
  $(this).removeClass("btn-success")
  $(this).text("Copy Reference")<commit_msg>Don't use ZeroClipboard if no flash<commit_after>hasFlash = false
try
  fo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash")
  hasFlash = true if fo
catch e
  hasFlash = true if navigator.mimeTypes and navigator.mimeTypes["application/x-shockwave-flash"] != undefined and navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin

if hasFlash
  ZeroClipboard.config(moviePath: asset_path("ZeroClipboard.swf"))
  clip = new ZeroClipboard($('#copyButton').get(0))

  clip.on 'mouseover', ->
    $(this).attr('data-clipboard-text', $('.reference textarea').text())

  clip.on 'complete', (event) ->
    $(".reference textarea").focus()
    $(".reference textarea").select()
    $(this).addClass("btn-success")
    $(this).text("Copied to clipboard")

  clip.on 'mouseout', ->
    $(this).removeClass("btn-success")
    $(this).text("Copy Reference")
else
  $('#copyButton').on 'click', ->
    $(".reference textarea").focus()
    $(".reference textarea").select()
{'fraction_non_alphanumeric': 0.1975642760487145, 'fraction_numerical': 0.0013531799729364006, 'mean_word_length': 5.1625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '4997337', 'n_tokens_mistral': 477, 'n_tokens_neox': 460, 'n_words': 86}