<commit_before>safari.application.addEventListener(
  'message',
  event => {
    var currentIndex = safari.application.activeBrowserWindow.tabs
      .indexOf(safari.application.activeBrowserWindow.activeTab);

    var tab = safari.application.activeBrowserWindow.openTab(
      null,
      currentIndex + 1
    );
    tab.url = event.message;
  },
  false
);
<commit_msg>Simplified main function by using object destructuring<commit_after>safari.application.addEventListener(
  'message',
  event => {
    const { tabs, activeTab } = safari.application.activeBrowserWindow;

    safari.application.activeBrowserWindow.openTab(
      null,
      tabs.indexOf(activeTab) + 1
    ).url = event.message;
  },
  false
);

{'fraction_non_alphanumeric': 0.10724233983286909, 'fraction_numerical': 0.002785515320334262, 'mean_word_length': 3.638709677419355, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1716152', 'n_tokens_mistral': 217, 'n_tokens_neox': 211, 'n_words': 36}