<commit_before>var playerContainer;
$(document).ready(function() {
	// get YT player container
	playerContainer = document.getElementById("player");
	
	// add YT script tag
	var tag = document.createElement("script");
	var firstScriptTag = document.getElementsByTagName("script")[0];
	tag.src = "https://www.youtube.com/player_api";
	firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
	
	// scroll to active episode
	if (document.getElementById("active")) {
		$("#sidebar").animate({scrollTop:$("#active").position().top},1000);
	}
	
	// load comment count on load
	if (document.getElementById("comments")) {
		setCommentCount($("#comments"), document.getElementById("comments").getAttribute("data-reddit"));
	}
	
	// capture timestamp click events
	$("body").on("click", "a.timelink", function() {
		seekYT($(this).data("timestamp"));
		
		// track in analytics
		if (typeof _gaq !== "undefined") {
			_gaq.push(["_trackEvent", "Timeline", "Seek", $("nav ul").data("current"), $(this).data("timestamp")]);
		}
		
		return false;
	});
	
	// show horizontal timeline tooltip on hover
	$("body").on({
		mouseenter: function(){
			document.getElementById($(this).children(".tooltip").attr("id")).style.display = "block";
		},
		mouseleave: function(){
			document.getElementById($(this).children(".tooltip").attr("id")).style.display = "none";
		}
	}, ".topic"); 
	
	// live search
	var search_timer;
	var previous_search;
	$("#search-field").on("input", function() {
		clearTimeout(search_timer);
		var search_value = this.value;
		
		search_timer = setTimeout(function() {
			if ($.trim(search_value) != "") {
				if (previous_search != search_value) {
					previous_search = search_value;
					
					// track search in analytics
					if (typeof _gaq !== "undefined") {
						_gaq.push(["_trackEvent", "Search", "Search", search_value]);<commit_msg>Updated how data attributes are accessed to fix timeline tracking<commit_after>var playerContainer;
$(document).ready(function() {
	// get YT player container
	playerContainer = document.getElementById("player");
	
	// add YT script tag
	var tag = document.createElement("script");
	var firstScriptTag = document.getElementsByTagName("script")[0];
	tag.src = "https://www.youtube.com/player_api";
	firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
	
	// scroll to active episode
	if (document.getElementById("active")) {
		$("#sidebar").animate({scrollTop:$("#active").position().top},1000);
	}
	
	// load comment count on load
	if (document.getElementById("comments")) {
		setCommentCount($("#comments"), document.getElementById("comments").getAttribute("data-reddit"));
	}
	
	// capture timestamp click events
	$("body").on("click", "a.timelink", function() {
		seekYT($(this).attr("data-timestamp"));
		
		// track in analytics
		if (typeof _gaq !== "undefined") {
			_gaq.push(["_trackEvent", "Timeline", "Seek", $("nav ul").attr("data-current"), $(this).attr("data-timestamp")]);
		}
		
		return false;
	});
	
	// show horizontal timeline tooltip on hover
	$("body").on({
		mouseenter: function(){
			document.getElementById($(this).children(".tooltip").attr("id")).style.display = "block";
		},
		mouseleave: function(){
			document.getElementById($(this).children(".tooltip").attr("id")).style.display = "none";
		}
	}, ".topic"); 
	
	// live search
	var search_timer;
	var previous_search;
	$("#search-field").on("input", function() {
		clearTimeout(search_timer);
		var search_value = this.value;
		
		search_timer = setTimeout(function() {
			if ($.trim(search_value) != "") {
				if (previous_search != search_value) {
					previous_search = search_value;
					
					// track search in analytics
					if (typeof _gaq !== "undefined") {
						_gaq.push(["_trackEvent", "Search", "Search", search_value]);
{'fraction_non_alphanumeric': 0.18530266983875232, 'fraction_numerical': 0.0026434047052603755, 'mean_word_length': 4.639344262295082, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '2033795', 'n_tokens_mistral': 1255, 'n_tokens_neox': 1115, 'n_words': 230}