<commit_before>/* jshint browser: true, devel: true, esversion: 6 */

var app = app || {};

(function(module){

  const formAsLetter = {};

  function printSection(divName) {
    var printContents = $(divName).html();
    var w = window.open();
    w.document.write(printContents);
    w.print();
    w.close();
  }

  formAsLetter.submit = () => {
    $('#print').on('click', (event) => {
      event.preventDefault();
      let userObject = {
        issues: $('#subject').val(),
        username: $('#from').val(),
        body: $('#mail-body').val(),
        userdate: new Date().toISOString()
      };
      // this next bit takes the issues and puts them in the database
      app.userIssues.insertIssues(userObject);
      // and this bit sends them to the print function
      module.letterFormContent = userObject;
      app.letterView.index();
      printSection('#print-letter-section');
    })
  }
  formAsLetter.submit();

  module.formAsLetter = formAsLetter;

})(app)
<commit_msg>Removed print click default<commit_after>/* jshint browser: true, devel: true, esversion: 6 */

var app = app || {};

(function(module){

  const formAsLetter = {};

  function printSection(divName) {
    var printContents = $(divName).html();
    var w = window.open();
    w.document.write(printContents);
    w.print();
    w.close();
  }

  formAsLetter.submit = () => {
    $('#print').on('click', (event) => {
      let userObject = {
        issues: $('#subject').val(),
        username: $('#from').val(),
        body: $('#mail-body').val(),
        userdate: new Date().toISOString()
      };
      // this next bit takes the issues and puts them in the database
      app.userIssues.insertIssues(userObject);
      // and this bit sends them to the print function
      module.letterFormContent = userObject;
      app.letterView.index();
      printSection('#print-letter-section');
    })
  }
  formAsLetter.submit();

  module.formAsLetter = formAsLetter;

})(app)

{'fraction_non_alphanumeric': 0.1661600810536981, 'fraction_numerical': 0.0010131712259371835, 'mean_word_length': 2.842412451361868, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5445113', 'n_tokens_mistral': 607, 'n_tokens_neox': 587, 'n_words': 142}