<commit_before>$(document).on 'playlist:resize', '#playing li[id]', (event) ->
  $self = $(event.currentTarget)
  $dummy = $self.clone()

  # TODO: function
  $dummy.addClass('dummy')
  $(document.body).append($dummy)
  self_width = $dummy.width()
  $dummy.remove()

  margin_left = 34
  timeleft_width = 112
  margin_padding = margin_left

  listeners_offset_left = $('#listeners').offset().left
  max_width = listeners_offset_left - margin_padding

  $self.css('max-width',  max_width)
  $self.find('.artist, .title').css('max-width',  (max_width - timeleft_width) * 0.5)

$(document).on 'click', '#playing li:first-child', ->
  $self = $(this).parent()
  return if String(getSelected())

  if $self.hasClass('playlist-expanded')
    $self.animate {'height': '30'}, 600, ->
      $self.css('height', '').removeClass('playlist-expanded')
      $('#lyrics').css('opacity', '')
  else
    $('#lyrics').css('opacity', 0.5)
    $self.addClass('playlist-expanded')

.on 'click', '#playing li:not(:first-child)', ->
  $self = $(this).parent()
  return if String(getSelected())

  timer.refresh(global: true)
  $('#lyrics').css('opacity', 0.5)
  $self.addClass('playlist-expanded')

$(document).on 'click', '#listeners', ->
  $(window).trigger('page:refresh', global: true)

$(window).ready ->
  playing = false
  callback = false

  $.jPlayer.reload = ->
    DEBUG('jPlayer: reload')
    $self = $(this)
    playing = false
    volume = memcache.get('volume')
    muted = memcache.get('muted')
    $self.jPlayer('destroy')
    $self.jPlayer($.jPlayer.config)
    $self.jPlayer('volume', volume) unless isNaN(volume)
    $self.jPlayer('mute', muted) unless isNaN(muted)<commit_msg>Remove conditional lyrics opacity<commit_after>$(document).on 'playlist:resize', '#playing li[id]', (event) ->
  $self = $(event.currentTarget)
  $dummy = $self.clone()

  # TODO: function
  $dummy.addClass('dummy')
  $(document.body).append($dummy)
  self_width = $dummy.width()
  $dummy.remove()

  margin_left = 34
  timeleft_width = 112
  margin_padding = margin_left

  listeners_offset_left = $('#listeners').offset().left
  max_width = listeners_offset_left - margin_padding

  $self.css('max-width',  max_width)
  $self.find('.artist, .title').css('max-width',  (max_width - timeleft_width) * 0.5)

$(document).on 'click', '#playing li:first-child', ->
  $self = $(this).parent()
  return if String(getSelected())

  if $self.hasClass('playlist-expanded')
    $self.animate {'height': '30'}, 600, ->
      $self.css('height', '').removeClass('playlist-expanded')
  else
    $self.addClass('playlist-expanded')

.on 'click', '#playing li:not(:first-child)', ->
  $self = $(this).parent()
  return if String(getSelected())

  timer.refresh(global: true)
  $self.addClass('playlist-expanded')

$(document).on 'click', '#listeners', ->
  $(window).trigger('page:refresh', global: true)

$(window).ready ->
  playing = false
  callback = false

  $.jPlayer.reload = ->
    DEBUG('jPlayer: reload')
    $self = $(this)
    playing = false
    volume = memcache.get('volume')
    muted = memcache.get('muted')
    $self.jPlayer('destroy')
    $self.jPlayer($.jPlayer.config)
    $self.jPlayer('volume', volume) unless isNaN(volume)
    $self.jPlayer('mute', muted) unless isNaN(muted)
{'fraction_non_alphanumeric': 0.19754601226993865, 'fraction_numerical': 0.008588957055214725, 'mean_word_length': 4.268174474959612, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '3210202', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1098, 'n_words': 201}