<commit_before>(function () {

if (!isMobile) {
    $('#person-section-tabs a').click(function () {
        var href = $(this).attr('href');
        gotoTab(href);
        return false;
    });

    $('#spec-container').scrollspy({
            'data-spy': 'scroll',
            'data-target': '#person-section-tabs',
            'offset': 100
        })
        .on('activate.changehash', function () {
            var target = $('#person-section-tabs li.active a').attr('href');
            selectTab(target);
        });

    function gotoTab(target) {
        selectTab(target);

        var $elem = $(target);
        $('#spec-container').animate({
            scrollTop: $elem.position().top
        }, 300);
    }

    function selectTab(target) {
        var $list = $('#person-section-tabs li');
        $list.removeClass('active');
        $list.children('[href="'+target+'"]').parent('li').addClass('active');

        if (location.hash != target) {
            if (history.pushState) {
                history.pushState({}, null, target);
            } else {
                location.hash = target;
            }
        }
    }<commit_msg>Fix scroll bug in person page<commit_after>(function () {

var $specContainer = $('#spec-container');

if (!isMobile) {
    $('#person-section-tabs a').click(function () {
        var href = $(this).attr('href');
        gotoTab(href);
        return false;
    });

    $specContainer.scrollspy({
            'data-spy': 'scroll',
            'data-target': '#person-section-tabs',
            'offset': 100
        })
        .on('activate.changehash', function () {
            var target = $('#person-section-tabs li.active a').attr('href');
            selectTab(target);
        });

    function gotoTab(target) {
        selectTab(target);

        var $elem = $(target);

        $specContainer.animate({
            scrollTop: $specContainer.scrollTop() + $elem.position().top
        }, 300);
    }

    function selectTab(target) {
        var $list = $('#person-section-tabs li');
        $list.removeClass('active');
        $list.children('[href="'+target+'"]').parent('li').addClass('active');

        if (location.hash != target) {
            if (history.pushState) {
                history.pushState({}, null, target);
            } else {
                location.hash = target;
            }
        }
    }
{'fraction_non_alphanumeric': 0.17758186397984888, 'fraction_numerical': 0.005037783375314861, 'mean_word_length': 1.891990291262136, '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': '6302008', 'n_tokens_mistral': 677, 'n_tokens_neox': 654, 'n_words': 119}