<commit_before>@ready = () ->
  $('[data-object~="form-load"]').submit()

$(document).ready(ready)
$(document).on('page:load', ready)

$(document).on('click', '#dataset-tabs a', (e) ->
  e.preventDefault()
  $(this).tab('show')
)

@setScrollShadow = (element) ->
  scroll = $(element).scrollTop();
  if scroll + $(element).innerHeight() == $(element)[0].scrollHeight
    $(element).removeClass("shadow-inset-bottom")
  else
    $(element).addClass("shadow-inset-bottom")

  if scroll == 0
    $(element).removeClass("shadow-inset-top")
  else
    $(element).addClass("shadow-inset-top")

jQuery ->
  $('.file-list-container').scroll( () ->
    setScrollShadow(this)
  )
  $('.file-list-container').each( (index, element) ->
    setScrollShadow($(element))
  )<commit_msg>Fixed scroll shadow not showing on page load (via turbolinks)<commit_after>@setScrollShadow = (element) ->
  return unless $(element)[0]
  scroll = $(element).scrollTop();
  if scroll + $(element).innerHeight() == $(element)[0].scrollHeight
    $(element).removeClass("shadow-inset-bottom")
  else
    $(element).addClass("shadow-inset-bottom")

  if scroll == 0
    $(element).removeClass("shadow-inset-top")
  else
    $(element).addClass("shadow-inset-top")

@ready = () ->
  $('[data-object~="form-load"]').submit()
  $('.file-list-container').scroll( () ->
    setScrollShadow(this)
  )
  setScrollShadow($('.file-list-container'))

$(document).ready(ready)
$(document).on('page:load', ready)
{'fraction_non_alphanumeric': 0.22275204359673023, 'fraction_numerical': 0.0034059945504087193, 'mean_word_length': 4.5643939393939394, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '5436223', 'n_tokens_mistral': 476, 'n_tokens_neox': 468, 'n_words': 72}