<commit_before>$(function() {
	$(document).on('click', '[data-microshare]', function(e){
		e.preventDefault();

		var shareScheme,
			shareService = $(this).attr('data-microshare').toLowerCase(),
			shareTitle = $(this).attr('data-microshare-title') || document.title,
			shareUrl = $(this).attr('data-microshare-url') || document.URL,
			shareMap = [{
					name: ['facebook', 'fb'],
					link: 'https://www.facebook.com/sharer/sharer.php?u='
				}, {
					name: ['twitter', 'tw'],
					link: 'https://twitter.com/home?status='
				}, {
					name: ['googleplus', 'gplus'],
					link: 'https://plus.google.com/share?url='
				}, {
					name: ['linkedin', 'in'],
					link: 'https://www.linkedin.com/shareArticle?mini=true&url='+shareUrl+'&title='+shareTitle+'&summary=&source='
				}];

			for(var x in shareMap) {
				if(shareMap[x].name.indexOf(shareService) > -1) {
					shareScheme = shareMap[x].link + shareUrl;
					break;
				}
			}

		window.open(shareScheme,'_blank','height=400, width=800');

	});
});<commit_msg>Ajusta variáveis e separa função que abre pop-up<commit_after>$(function() {
  'use strict';

  var openPopup;

  openPopup = function(e) {
    e.preventDefault();

    var shareService,
      shareTitle,
      shareUrl,
      shareMap,
      shareScheme;

    shareService = $(this).attr('data-microshare').toLowerCase(),
    shareTitle = $(this).attr('data-microshare-title') || document.title,
    shareUrl = $(this).attr('data-microshare-url') || document.URL,

		shareMap = [{
      name: ['facebook', 'fb'],
      link: 'https://www.facebook.com/sharer/sharer.php?u='
    }, {
      name: ['twitter', 'tw'],
      link: 'https://twitter.com/home?status='
    }, {
      name: ['googleplus', 'gplus'],
      link: 'https://plus.google.com/share?url='
    }, {
      name: ['linkedin', 'in'],
      link: 'https://www.linkedin.com/shareArticle?mini=true&url=' + shareUrl + '&title=' + shareTitle + '&summary=&source='
    }];

    for (var x in shareMap) {
      if (shareMap[x].name.indexOf(shareService) > -1) {
        shareScheme = shareMap[x].link + shareUrl;
        break;
      }
    }

    window.open(shareScheme, '_blank', 'height=400, width=800');
  };

  $(document).on('click', '[data-microshare]', openPopup);
});
{'fraction_non_alphanumeric': 0.20718722271517304, 'fraction_numerical': 0.006211180124223602, 'mean_word_length': 3.2789373814041745, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, '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': '2239596', 'n_tokens_mistral': 866, 'n_tokens_neox': 763, 'n_words': 121}