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

	$('.site-header .logo a').show();

	if(!Cookies.get('returning_visitor')) {
		var paths = $('.site-header .logo path:not(defs path)');
	}

	var paths = $('.site-header .logo path:not(defs path)');
	paths.each(function(i, e) {
	    e.style.strokeDasharray = e.style.strokeDashoffset = e.getTotalLength();
	});
	var tl = new TimelineMax();

	var e = Power0.easeIn;
	var d = 1; 

	tl.add([
	    TweenLite.to(paths.eq(0), .3, {strokeDashoffset: 0, delay: d+0, ease: e}), // T
	    TweenLite.to(paths.eq(1), .3, {strokeDashoffset: 0, delay: d+0.3, ease: e}), // T
	    TweenLite.to(paths.eq(2), 1, {strokeDashoffset: 0, delay: d+.5, ease: e}), // ro
	    TweenLite.to(paths.eq(3), .5, {strokeDashoffset: 0, delay: d+1.5, ease: e}), // y

	    TweenLite.to(paths.eq(4), .5, {strokeDashoffset: 0, delay: d+2.5}), // S
	   	TweenLite.to(paths.eq(5), .15, {strokeDashoffset: 0, delay: d+3}), // t
	    TweenLite.to(paths.eq(6), .75, {strokeDashoffset: 0, delay: d+3.15}), // ori
	    TweenLite.to(paths.eq(7), .15, {strokeDashoffset: 0, delay: d+3.90}), // i
	    TweenLite.to(paths.eq(8), .35, {strokeDashoffset: 0, delay: d+4.05}), // es

	]).timeScale(2.5);

	$('.site-header .logo').mouseenter(function() { tl.pause(); });
	$('.site-header .logo').mouseleave(function() { tl.play(); });	

});
<commit_msg>Use cookies to only show animation once per visit<commit_after>jQuery(document).ready(function($) {

	$('.site-header .logo a').show();

	if(Cookies.get('returning_visitor')) {

		var paths = $('.site-header .logo path:not(defs path)');
		paths.each(function(i, e) {
		    e.style.strokeDasharray = e.style.strokeDashoffset = e.getTotalLength();
		});
		var tl = new TimelineMax();

		var e = Power0.easeIn;
		var d = 1; 

		tl.add([
		    TweenLite.to(paths.eq(0), .3, {strokeDashoffset: 0, delay: d+0, ease: e}), // T
		    TweenLite.to(paths.eq(1), .3, {strokeDashoffset: 0, delay: d+0.3, ease: e}), // T
		    TweenLite.to(paths.eq(2), 1, {strokeDashoffset: 0, delay: d+.5, ease: e}), // ro
		    TweenLite.to(paths.eq(3), .5, {strokeDashoffset: 0, delay: d+1.5, ease: e}), // y

		    TweenLite.to(paths.eq(4), .5, {strokeDashoffset: 0, delay: d+2.5}), // S
		   	TweenLite.to(paths.eq(5), .15, {strokeDashoffset: 0, delay: d+3}), // t
		    TweenLite.to(paths.eq(6), .75, {strokeDashoffset: 0, delay: d+3.15}), // ori
		    TweenLite.to(paths.eq(7), .15, {strokeDashoffset: 0, delay: d+3.90}), // i
		    TweenLite.to(paths.eq(8), .35, {strokeDashoffset: 0, delay: d+4.05}), // es

		]).timeScale(2.5);

		$('.site-header .logo').mouseenter(function() { tl.pause(); });
		$('.site-header .logo').mouseleave(function() { tl.play(); });	

	} else {
		Cookies.set('returning_visitor', '1', { expires: 1 });
	}


});

{'fraction_non_alphanumeric': 0.2282726289217454, 'fraction_numerical': 0.03894698882077173, 'mean_word_length': 3.4455128205128207, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3166592', 'n_tokens_mistral': 1229, 'n_tokens_neox': 1137, 'n_words': 229}