<commit_before>(function() {
  model.updatePlayerControlNext = function() {
    var index = model.playerControlFlags().indexOf(true)
    console.log(index)

    index += 1
    if (index >= model.playerControlFlags().length) {
      index = 0
    }

    console.log(index)
    model.updatePlayerControlFlag(index)
  }


  // current state appears to be pre-ko-foreach
  $('tr:nth-child(2)').attr('data-bind', 'click: function () { $parent.updatePlayerControlFlag($index()); }')

  handlers.improved_player_control_colors = function(colors) {
    $('.container').css(colors)
  }

  handlers.improved_player_control_change = model.updatePlayerControlFlag
  handlers.improved_player_control_next = model.updatePlayerControlNext
})()
<commit_msg>secondary color border on player swatch<commit_after>(function() {
  model.updatePlayerControlNext = function() {
    var index = model.playerControlFlags().indexOf(true)
    console.log(index)

    index += 1
    if (index >= model.playerControlFlags().length) {
      index = 0
    }

    console.log(index)
    model.updatePlayerControlFlag(index)
  }

  model.htmlColor = function(color) {
    console.log(color)
    return 'rgb(' + Math.floor(color[0]) + ',' + Math.floor(color[1]) + ',' + Math.floor(color[2]) + ')';
  }

  // current state appears to be pre-ko-foreach
  $('tr:nth-child(2)').attr('data-bind', 'click: function () { $parent.updatePlayerControlFlag($index()); }')

  $('.div_primary_color').attr('data-bind', 'style: { backgroundColor: $data.color, borderColor: $parent.htmlColor(secondary_color) }')

  handlers.improved_player_control_colors = function(colors) {
    $('.container').css(colors)
  }

  handlers.improved_player_control_change = model.updatePlayerControlFlag
  handlers.improved_player_control_next = model.updatePlayerControlNext
})()

{'fraction_non_alphanumeric': 0.15088105726872247, 'fraction_numerical': 0.004955947136563877, 'mean_word_length': 4.4894259818731115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1884131', 'n_tokens_mistral': 584, 'n_tokens_neox': 560, 'n_words': 85}