<commit_before>links = document.links;
for(var i = 0; i < links.length; ++i) {
  href = links[i].href;
  if(href) {
    if(href.match(/http:\/\/vkontakte\.ru\/away\.php\?to=/)) {
      links[i].href = unescape(href.substr(32));
    }
    if(href.match(/http:\/\/vk\.com\/away\.php\?to=/)) {
      links[i].href = unescape(href.substr(26));
    }
  }
}<commit_msg>Return support of old algorithm (changing document.location)<commit_after>function replace_away_link_at(obj) {
  if(!obj.href) return;

  if( obj.href.match(/^http:\/\/vkontakte\.ru\/away\.php/) ) {
    obj.href = unescape(obj.href.substr(32));
  }
  if( obj.href.match(/^http:\/\/vk\.com\/away\.php/) ) {
    obj.href = unescape(obj.href.substr(26));
  }
}

replace_away_link_at(document.location);

links = document.links;
for(var i = 0; i < links.length; ++i) {
  replace_away_link_at(links[i]);
}
{'fraction_non_alphanumeric': 0.22247972190034762, 'fraction_numerical': 0.011587485515643106, 'mean_word_length': 3.235294117647059, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7494661', 'n_tokens_mistral': 358, 'n_tokens_neox': 336, 'n_words': 45}