<commit_before>var refresh_fqdn = function() {
    // Get fqdn from CozyDB
    $.get("./debian/fqdn", function(data) {
        // And update view
        $("#input-fqdn").val(data);
    });
};

var save_fqdn = function() {
    // Get new value in input text
    var form_value = $("#input-fqdn").val();
    // Push configuration
    $.post("./debian/fqdn", {fqdn: form_value}, function(data) {
        $("#div-status-ko").hide();
        $("#div-status-ok").html(data.message);
        $("#div-status-ok").show();
    });
};

var Application = {
  initialize: function () {
      refresh_fqdn();
      $("#button-refresh").click(function() {
          refresh_fqdn();
      });
      $("#button-reconfigure").click(function() {
          save_fqdn();
      });
      $(document).ajaxError(function(event, jqxhr, settings, thrownError) {
        $("#div-status-ok").hide();
        $("#div-status-ko").html(thrownError + ':<br/>\n' + jqxhr.responseText);
        $("#div-status-ko").show();
      });
  }
};

module.exports = Application;<commit_msg>Chain jQuery methods<commit_after>var refresh_fqdn = function() {
    // Get fqdn from CozyDB
    $.get("./debian/fqdn", function(data) {
        // And update view
        $("#input-fqdn").val(data);
    });
};

var save_fqdn = function() {
    // Get new value in input text
    var form_value = $("#input-fqdn").val();
    // Push configuration
    $.post("./debian/fqdn", {fqdn: form_value}, function(data) {
        $("#div-status-ko").hide();
        $("#div-status-ok").html(data.message).show();
    });
};

var Application = {
  initialize: function () {
      refresh_fqdn();
      $("#button-refresh").click(function() {
          refresh_fqdn();
      });
      $("#button-reconfigure").click(function() {
          save_fqdn();
      });
      $(document).ajaxError(function(event, jqxhr, settings, thrownError) {
        $("#div-status-ok").hide();
        $("#div-status-ko").html(thrownError + ':<br/>\n' + jqxhr.responseText).show();
      });
  }
};

module.exports = Application;
{'fraction_non_alphanumeric': 0.21397166585246702, 'fraction_numerical': 0.0, 'mean_word_length': 2.574171029668412, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3362672', 'n_tokens_mistral': 673, 'n_tokens_neox': 679, 'n_words': 107}