<commit_before>const Functions = {
  getMetaContent: function(name) {
    var metas = document.getElementsByTagName('meta');
 
    for (var i=0; i<metas.length; i++) {
      if (metas[i].getAttribute("name") == name) {
        return metas[i].getAttribute("content");
      }
    }
 
    return "";
  },
  downloadFile(file) {
    const {contents, name} = file;
    const link = document.createElement('a');
    link.download = name;
    link.href = contents;
    link.click();
  }
};
 
module.exports = Functions;<commit_msg>fix generate report bug on firefox (checked on chromium) resolve #180<commit_after>const Functions = {
  getMetaContent: function(name) {
    var metas = document.getElementsByTagName('meta');

    for (var i=0; i<metas.length; i++) {
      if (metas[i].getAttribute("name") == name) {
        return metas[i].getAttribute("content");
      }
    }

    return "";
  },
  downloadFile(file) {
    const {contents, name} = file;
    const link = document.createElement('a');
    link.download = name;
    link.href = contents;
    //link.click();
    let event = new MouseEvent('click', {
      'view': window,
      'bubbles': true,
      'cancelable': true
    });
    link.dispatchEvent(event);
  }
};

module.exports = Functions;

{'fraction_non_alphanumeric': 0.15647339158061954, 'fraction_numerical': 0.003971405877680699, 'mean_word_length': 2.9873417721518987, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5390575', 'n_tokens_mistral': 408, 'n_tokens_neox': 395, 'n_words': 86}