<commit_before>$(document).ready(function() {

  var openLink = function(url) {
    chrome.extension.sendRequest({url: url});
  };

  $('body').on('click', 'a[target="_blank"]', function(e) {
    e.preventDefault();
    var $link = $(this);
    openLink($link.attr('href'));
  });

  // disable jquery animations
  document.location = 'javascript:$.fx.off=true;';

  // open links when pressing `o`
  $(document).on('keypress', function(event) {
    if(event.charCode != 111) {
      return;
    }
    var $current_tweet = $('.hovered-stream-item');
    if($current_tweet.length > 0) {
      var $links = $('a[target="_blank"]', $current_tweet);
      if($links.length > 0) {
        $($links[0]).click();
      }
    }
  });
});<commit_msg>also open links on expanded tweets<commit_after>$(document).ready(function() {

  var openLink = function(url) {
    chrome.extension.sendRequest({url: url});
  };

  $('body').on('click', 'a[target="_blank"]', function(e) {
    e.preventDefault();
    var $link = $(this);
    openLink($link.attr('href'));
  });

  // disable jquery animations
  document.location = 'javascript:$.fx.off=true;';

  // open links when pressing `o`
  $(document).on('keypress', function(event) {
    if(event.charCode != 111) {
      return;
    }
    var $current_tweet = $('.hovered-stream-item, .js-had-hovered-stream-item');
    if($current_tweet.length > 0) {
      var $links = $('a[target="_blank"]', $current_tweet);
      if($links.length > 0) {
        $($links[0]).click();
      }
    }
  });
});
{'fraction_non_alphanumeric': 0.21279373368146215, 'fraction_numerical': 0.007832898172323759, 'mean_word_length': 3.234806629834254, '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': '2292945', 'n_tokens_mistral': 537, 'n_tokens_neox': 509, 'n_words': 88}