<commit_before>(function($) {
    $(document).ready(function() {
        // add foo for printing
        function beforePrint () {
                // console.log('before print');
                $('.slot').each(function() {
                    $(".track-header.sticky").trigger("sticky_kit:detach");
                });
        };

        function afterPrint() {
                // console.log('after print');
                $('.slot').each(function() {
                    $(".track-header.sticky").trigger("sticky_kit:detach");
                });
        };

        $(window).bind("onbeforeprint", beforePrint);
        $(window).bind("onafterprint", afterPrint);

        var printHandler = function(mql) {
            if(mql.matches) {
                beforePrint();
            } else {
                afterPrint();
            }
        };

        var mql = window.matchMedia('print');
        mql.addListener(printHandler);
        // end: foo for printing

		// add: bar for copy and pasting
		//      remove &shy; from text
		$(window).on("copy", function(e) {

            // don't bother with very ancient browsers
			if (typeof window.getSelection == "undefined") return;

			function recursiveReplace(node, searchpat, subpat) {
				if (node.nodeType == 3) {
					node.nodeValue = node.nodeValue.replace(searchpat, subpat);
				} else if (typeof node.childNodes !== "undefined") {
                    for (child in node.childNodes) {
                        cnode = node.childNodes[child];
                        recursiveReplace(cnode, searchpat, subpat);
                    }
                }
			};

			var sel = window.getSelection();
            var newobj = $('<div>', {html: sel.getRangeAt(0).cloneContents(),
                style: {position: 'absolute', left:
                    '-99999px'}}).appendTo('body');
            var newnode = newobj[0];

            // replace &shy;
            recursiveReplace(newnode, /\u00AD/g, '');
			sel.selectAllChildren(newnode);
			window.setTimeout(function () { newnode.remove(); }, 100);
		});

        $(window).load(function() {
            $('#st-container').removeClass('disable-scrolling');
            $('#loading-animation').fadeOut();
            $('#preloader').delay(350).fadeOut(800);
            initGooglePlus();
            equalheight('.same-height');
        });

        if ($(window).width() > 1500) {
            $('.effect-wrapper').addClass('col-lg-3');
        }
        if ($(window).width() < 768) {
            $('.animated').removeClass('animated').removeClass('hiding');
            $('.stat span').removeClass('timer');
            $('.timeslot-label').addClass('stick-label');
        }
        if ($(window).height() < 512) {
            $('#bottom-navlinks').removeClass('bottom-navlinks').addClass('bottom-navlinks-small');
        }
        if ($(window).scrollTop() >= 100) {
            $('#top-header').addClass('after-scroll');
            $('#logo-header .logo').removeClass('logo-light').addClass('logo-dark');
            $('#logo-xs').removeClass('logo-light').addClass('logo-dark');
        }

        $(window).scroll(function() {
            var scroll = $(this).scrollTop();
            var header = $('#top-header');
            var logo = $('#logo-header .logo');
            var logo_xs = $('#logo-xs');
            var buyButton = $('.right-nav-button');
            var topOffset = header.height() + $('.track-header').height();

            if (scroll >= 100) {
                header.addClass('after-scroll');
                logo.removeClass('logo-light').addClass('logo-dark');
                logo_xs.removeClass('logo-light').addClass('logo-dark');
            } else {
                header.removeClass('after-scroll');
                logo.removeClass('logo-dark').addClass('logo-light');
                logo_xs.removeClass('logo-dark').addClass('logo-light');
            }

            if (scroll >= $('.top-section').height() && $(window).width() > 767) {
                buyButton.removeClass('right-nav-button-hidden');
            } else if (scroll < $('.top-section').height() && $(window).width() > 767){
                buyButton.addClass('right-nav-button-hidden');
            }

            $('.slot').each(function() {
                var currentPosition = $(this).offset().top - scroll;
                var offsetActivator = topOffset + $(this).find('.slot-title').height();
                if (currentPosition <= offsetActivator && currentPosition >= 0) {
                    $('.track-header.sticky').find('.slot-detail').html($(this).data('slotDetail'));
                }
            });
        });

        $(window).resize(function() {
            if ($(window).width() > 1500) {
                $('.effect-wrapper').addClass('col-lg-3');
            } else {<commit_msg>Fix header fades out too late<commit_after>(function($) {
    $(document).ready(function() {
        // add foo for printing
        function beforePrint () {
                // console.log('before print');
                $('.slot').each(function() {
                    $(".track-header.sticky").trigger("sticky_kit:detach");
                });
        };

        function afterPrint() {
                // console.log('after print');
                $('.slot').each(function() {
                    $(".track-header.sticky").trigger("sticky_kit:detach");
                });
        };

        $(window).bind("onbeforeprint", beforePrint);
        $(window).bind("onafterprint", afterPrint);

        var printHandler = function(mql) {
            if(mql.matches) {
                beforePrint();
            } else {
                afterPrint();
            }
        };

        var mql = window.matchMedia('print');
        mql.addListener(printHandler);
        // end: foo for printing

		// add: bar for copy and pasting
		//      remove &shy; from text
		$(window).on("copy", function(e) {

            // don't bother with very ancient browsers
			if (typeof window.getSelection == "undefined") return;

			function recursiveReplace(node, searchpat, subpat) {
				if (node.nodeType == 3) {
					node.nodeValue = node.nodeValue.replace(searchpat, subpat);
				} else if (typeof node.childNodes !== "undefined") {
                    for (child in node.childNodes) {
                        cnode = node.childNodes[child];
                        recursiveReplace(cnode, searchpat, subpat);
                    }
                }
			};

			var sel = window.getSelection();
            var newobj = $('<div>', {html: sel.getRangeAt(0).cloneContents(),
                style: {position: 'absolute', left:
                    '-99999px'}}).appendTo('body');
            var newnode = newobj[0];

            // replace &shy;
            recursiveReplace(newnode, /\u00AD/g, '');
			sel.selectAllChildren(newnode);
			window.setTimeout(function () { newnode.remove(); }, 100);
		});

        $(window).load(function() {
            $('#st-container').removeClass('disable-scrolling');
            $('#loading-animation').fadeOut();
            $('#preloader').delay(350).fadeOut(800);
            initGooglePlus();
            equalheight('.same-height');
        });

        if ($(window).width() > 1500) {
            $('.effect-wrapper').addClass('col-lg-3');
        }
        if ($(window).width() < 768) {
            $('.animated').removeClass('animated').removeClass('hiding');
            $('.stat span').removeClass('timer');
            $('.timeslot-label').addClass('stick-label');
        }
        if ($(window).height() < 512) {
            $('#bottom-navlinks').removeClass('bottom-navlinks').addClass('bottom-navlinks-small');
        }
        if ($(window).scrollTop() >= 75) {
            $('#top-header').addClass('after-scroll');
            $('#logo-header .logo').removeClass('logo-light').addClass('logo-dark');
            $('#logo-xs').removeClass('logo-light').addClass('logo-dark');
        }

        $(window).scroll(function() {
            var scroll = $(this).scrollTop();
            var header = $('#top-header');
            var logo = $('#logo-header .logo');
            var logo_xs = $('#logo-xs');
            var buyButton = $('.right-nav-button');
            var topOffset = header.height() + $('.track-header').height();

            if (scroll >= 75) {
                header.addClass('after-scroll');
                logo.removeClass('logo-light').addClass('logo-dark');
                logo_xs.removeClass('logo-light').addClass('logo-dark');
            } else {
                header.removeClass('after-scroll');
                logo.removeClass('logo-dark').addClass('logo-light');
                logo_xs.removeClass('logo-dark').addClass('logo-light');
            }

            if (scroll >= $('.top-section').height() && $(window).width() > 767) {
                buyButton.removeClass('right-nav-button-hidden');
            } else if (scroll < $('.top-section').height() && $(window).width() > 767){
                buyButton.addClass('right-nav-button-hidden');
            }

            $('.slot').each(function() {
                var currentPosition = $(this).offset().top - scroll;
                var offsetActivator = topOffset + $(this).find('.slot-title').height();
                if (currentPosition <= offsetActivator && currentPosition >= 0) {
                    $('.track-header.sticky').find('.slot-detail').html($(this).data('slotDetail'));
                }
            });
        });

        $(window).resize(function() {
            if ($(window).width() > 1500) {
                $('.effect-wrapper').addClass('col-lg-3');
            } else {
{'fraction_non_alphanumeric': 0.18095238095238095, 'fraction_numerical': 0.009730848861283644, 'mean_word_length': 1.798667439165701, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, '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': '2429235', 'n_tokens_mistral': 2705, 'n_tokens_neox': 2504, 'n_words': 407}