<commit_before>$(document).ready(function() {
  var sendingVol = false;
  var volChange = false;

  function send_slider_volume() {
    if (sendingVol || !volChange) return;
    var curVol = $("#mastervolslider").slider( "option", "value");
    sendingVol = true; volChange = false;
    $('#mastervolval').text(Math.round(curVol * 100).toString() + '%');
    // console.log("Sending volume " + curVol.toString());
    $.ajax({ url: "../control/volume?level=" + curVol.toString(), type: 'POST' }).complete(function() { 
      sendingVol = false; send_slider_volume();
    });
  }

  $("#mastervolslider").slider({
     animate: true,
     min : 0.0, max : 1.5, range : 'true', value : 1.0, step : 0.05,
     slide : function(event, ui) { volChange = true; send_slider_volume(); },
     change : function(event, ui) { volChange = true; send_slider_volume(); }
  });
  $("#play").click(function() { $.ajax({ url: "../control/play", type: 'POST' }); });
  $("#pause").click(function() { $.ajax({ url: "../control/pause" , type: 'POST'}); });
  $("#next").click(function() { $.ajax({ url: "../control/next" , type: 'POST'}); });
});<commit_msg>Make the volume control finer grained.<commit_after>$(document).ready(function() {
  var sendingVol = false;
  var volChange = false;

  function send_slider_volume() {
    if (sendingVol || !volChange) return;
    var curVol = $("#mastervolslider").slider( "option", "value");
    sendingVol = true; volChange = false;
    $('#mastervolval').text(Math.round(curVol * 100).toString() + '%');
    // console.log("Sending volume " + curVol.toString());
    $.ajax({ url: "../control/volume?level=" + curVol.toString(), type: 'POST' }).complete(function() { 
      sendingVol = false; send_slider_volume();
    });
  }

  $("#mastervolslider").slider({
     animate: true,
     min : 0.0, max : 1.5, range : 'true', value : 1.0, step : 0.01,
     slide : function(event, ui) { volChange = true; send_slider_volume(); },
     change : function(event, ui) { volChange = true; send_slider_volume(); }
  });
  $("#play").click(function() { $.ajax({ url: "../control/play", type: 'POST' }); });
  $("#pause").click(function() { $.ajax({ url: "../control/pause" , type: 'POST'}); });
  $("#next").click(function() { $.ajax({ url: "../control/next" , type: 'POST'}); });
});
{'fraction_non_alphanumeric': 0.23143725575336518, 'fraction_numerical': 0.010421189752496743, 'mean_word_length': 3.8100208768267225, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6303854', 'n_tokens_mistral': 746, 'n_tokens_neox': 742, 'n_words': 165}