<commit_before>Spree.ready ($) ->
  if ($ 'form#update-cart').is('*')
    ($ 'form#update-cart a.delete').show().one 'click', ->
      ($ this).parents('.line-item').first().find('input.line_item_quantity').val 0
      ($ this).parents('form').first().submit()
      false

  ($ 'form#update-cart').submit ->
    ($ 'form#update-cart #update-button').attr('disabled', true)

  $.ajax
    url: Spree.routes.cart_link,
    success: (data) ->
      $('#link-to-cart').html data<commit_msg>fetch_cart is an AJAX request called before the page has finished loading<commit_after>Spree.ready ($) ->
  if ($ 'form#update-cart').is('*')
    ($ 'form#update-cart a.delete').show().one 'click', ->
      ($ this).parents('.line-item').first().find('input.line_item_quantity').val 0
      ($ this).parents('form').first().submit()
      false

  ($ 'form#update-cart').submit ->
    ($ 'form#update-cart #update-button').attr('disabled', true)

Spree.fetch_cart = ->
  $.ajax
    url: Spree.routes.cart_link,
    success: (data) ->
      $('#link-to-cart').html data
{'fraction_non_alphanumeric': 0.22770398481973433, 'fraction_numerical': 0.0018975332068311196, 'mean_word_length': 3.414225941422594, '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': '826858', 'n_tokens_mistral': 351, 'n_tokens_neox': 346, 'n_words': 53}