<commit_before>/**
 * content.js
 */
"use strict";
{
  /* api */
  const {i18n, runtime} = browser;

  /* constants */
  const CONTEXT_INFO = "contextInfo";
  const CONTEXT_INFO_GET = "getContextInfo";
  const COPY_LINK = "copyLinkURL";
  const COPY_PAGE = "copyPageURL";
  const EXEC_COPY = "executeCopy";
  const MOUSE_BUTTON_RIGHT = 2;
  const USER_INPUT = "userInput";
  const USER_INPUT_DEFAULT = "Input Title";

  const BBCODE_TEXT = "BBCodeText";
  const BBCODE_TEXT_TEMPLATE = "[url=%url%]%content%[/url]";
  const BBCODE_URL = "BBCodeURL";
  const BBCODE_URL_TEMPLATE = "[url]%content%[/url]";
  const HTML = "HTML";
  const HTML_TEMPLATE = "<a href=\"%url%\" title=\"%title%\">%content%</a>";
  const MARKDOWN = "Markdown";
  const MARKDOWN_TEMPLATE = "[%content%](%url% \"%title%\")";
  const TEXT = "Text";
  const TEXT_TEMPLATE = "%content% <%url%>";

  /**
   * log error
   * @param {!Object} e - Error
   * @returns {boolean} - false
   */
  const logError = e => {
    console.error(e);
    return false;
  };

  /**
   * is string
   * @param {*} o - object to check
   * @returns {boolean} - result
   */
  const isString = o => typeof o === "string" || o instanceof String;

  /**
   * send message
   * @param {*} msg - message
   * @returns {?AsyncFunction} - send message to runtime
   */
  const sendMsg = async msg => {
    const func = msg && runtime.sendMessage(msg);
    return func || null;
  };

  /**<commit_msg>Remove angle brackets from text template<commit_after>/**
 * content.js
 */
"use strict";
{
  /* api */
  const {i18n, runtime} = browser;

  /* constants */
  const CONTEXT_INFO = "contextInfo";
  const CONTEXT_INFO_GET = "getContextInfo";
  const COPY_LINK = "copyLinkURL";
  const COPY_PAGE = "copyPageURL";
  const EXEC_COPY = "executeCopy";
  const MOUSE_BUTTON_RIGHT = 2;
  const USER_INPUT = "userInput";
  const USER_INPUT_DEFAULT = "Input Title";

  const BBCODE_TEXT = "BBCodeText";
  const BBCODE_TEXT_TEMPLATE = "[url=%url%]%content%[/url]";
  const BBCODE_URL = "BBCodeURL";
  const BBCODE_URL_TEMPLATE = "[url]%content%[/url]";
  const HTML = "HTML";
  const HTML_TEMPLATE = "<a href=\"%url%\" title=\"%title%\">%content%</a>";
  const MARKDOWN = "Markdown";
  const MARKDOWN_TEMPLATE = "[%content%](%url% \"%title%\")";
  const TEXT = "Text";
  const TEXT_TEMPLATE = "%content% %url%";

  /**
   * log error
   * @param {!Object} e - Error
   * @returns {boolean} - false
   */
  const logError = e => {
    console.error(e);
    return false;
  };

  /**
   * is string
   * @param {*} o - object to check
   * @returns {boolean} - result
   */
  const isString = o => typeof o === "string" || o instanceof String;

  /**
   * send message
   * @param {*} msg - message
   * @returns {?AsyncFunction} - send message to runtime
   */
  const sendMsg = async msg => {
    const func = msg && runtime.sendMessage(msg);
    return func || null;
  };

  /**
{'fraction_non_alphanumeric': 0.16970113363105463, 'fraction_numerical': 0.0020611473720371005, 'mean_word_length': 3.2448979591836733, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 14, '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': '2049826', 'n_tokens_mistral': 1031, 'n_tokens_neox': 1018, 'n_words': 255}