<commit_before>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

const TypicalReplyButtons = {
  get utils() {
    delete this.utils;
    let { TypicalReply } = Components.utils.import('resource://typical-reply-modules/TypicalReply.jsm', {});
    return this.utils = TypicalReply;
  },

  onCommand(aEvent) {
    const target = aEvent.target;
    const type = target.getAttribute('data-type');

    const definition = this.utils.getDefinition(type);

    if (definition.alwaysQuote)
      this.utils.quote = true;
    else
      this.utils.quote = target.getAttribute('data-quote') == 'true';

    this.utils.type = type;

    if (definition.recipients == this.utils.RECIPIENTS_ALL ||
        definition.recipients == this.utils.RECIPIENTS_FORWARD)
      MsgReplyToAllMessage(aEvent);
    else
      MsgReplySender(aEvent);
  },
<commit_msg>Expose TypicalReplyButtons<commit_after>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

var TypicalReplyButtons = {
  get utils() {
    delete this.utils;
    let { TypicalReply } = Components.utils.import('resource://typical-reply-modules/TypicalReply.jsm', {});
    return this.utils = TypicalReply;
  },

  onCommand(aEvent) {
    const target = aEvent.target;
    const type = target.getAttribute('data-type');

    const definition = this.utils.getDefinition(type);

    if (definition.alwaysQuote)
      this.utils.quote = true;
    else
      this.utils.quote = target.getAttribute('data-quote') == 'true';

    this.utils.type = type;

    if (definition.recipients == this.utils.RECIPIENTS_ALL ||
        definition.recipients == this.utils.RECIPIENTS_FORWARD)
      MsgReplyToAllMessage(aEvent);
    else
      MsgReplySender(aEvent);
  },

{'fraction_non_alphanumeric': 0.12169576059850375, 'fraction_numerical': 0.00399002493765586, 'mean_word_length': 3.2680851063829786, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5875209', 'n_tokens_mistral': 636, 'n_tokens_neox': 607, 'n_words': 151}