{"size": 2256, "ext": "js", "max_stars_repo_path": "control-master/control50/js/script.js", "max_stars_repo_name": "AlexRogalskiy/DevArtifacts", "max_stars_repo_stars_event_min_datetime": "2018-09-07T15:35:24.000Z", "max_stars_repo_stars_event_max_datetime": "2019-03-27T09:48:12.000Z", "max_issues_repo_path": "control-master/control50/js/script.js", "max_issues_repo_name": "AlexRogalskiy/DevArtifacts", "max_issues_repo_issues_event_min_datetime": "2020-03-04T21:51:56.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T20:59:11.000Z", "max_forks_repo_path": "control-master/control50/js/script.js", "max_forks_repo_name": "AlexRogalskiy/DevArtifacts", "max_forks_repo_forks_event_min_datetime": "2019-06-18T19:57:17.000Z", "max_forks_repo_forks_event_max_datetime": "2020-11-06T03:55:08.000Z"}
{"max_stars_count": 4, "max_issues_count": 371, "max_forks_count": 3, "avg_line_length": 31.7746478873, "max_line_length": 105, "alphanum_fraction": 0.6427304965}
// show and hide styled inputs, update natural language statement
$('.input-container').click(function() {
  var target = $(this);
  var targetInput = $(this).find('input');
  var targetSelect = $(this).find('select');
  var styledSelect = $(this).find('.newSelect');
  target.addClass('active');
  targetInput.focus();
  targetInput.change(function() {
    var inputValue = $(this).val();
    var placeholder = target.find('.placeholder')
    target.removeClass('active');
    placeholder.html(inputValue);
  });
  targetSelect.change(function() {
    var inputValue = $(this).val();
    var placeholder = target.find('.placeholder')
    target.removeClass('active');
    placeholder.html(inputValue);
  });
  styledSelect.click(function() {
    var target = $(this);
    setTimeout(function() {
      target.parent().parent().removeClass('active');
    }, 10);
  });
});

// style selects

// Create the new select
var select = $('.fancy-select');
select.wrap('<div class="newSelect"></div>');
$('.newSelect').prepend('<div class="newOptions"></div>');

//populate the new select
select.each(function() {
  var selectOption = $(this).find('option');
  var target = $(this).parent().find('.newOptions');
  selectOption.each(function() {
    var optionContents = $(this).html();
    var optionValue = $(this).attr('value');
    target.append('<div class="newOption" data-value="' + optionValue + '">' + optionContents + '</div>')
  });
});
// new select functionality
var newSelect = $('.newSelect');
var newOption = $('.newOption');
// update based on selection 
newOption.on('mouseup', function() {
  var OptionInUse = $(this);
  var siblingOptions = $(this).parent().find('.newOption');
  var newValue = $(this).attr('data-value');
  var selectOption = $(this).parent().parent().find('select option');
  // style selected option
  siblingOptions.removeClass('selected');
  OptionInUse.addClass('selected');
  // update the actual input
  selectOption.each(function() {
    var optionValue = $(this).attr('value');
    if (newValue == optionValue) {
      $(this).prop('selected', true);
    } else {
      $(this).prop('selected', false);
    }
  })
});
newSelect.click(function() {
  var target = $(this);
  target.parent().find('select').change();
});