<commit_before>jQuery(function () {
    // Javascript to enable link to tab
    var url = document.location.toString();
    if (url.match('#')) {
        $('.wt-tabs.nav-tabs a[href="#'+url.split('#')[1]+'"]').tab('show') ;
    }

    // Change hash for page-reload
    $('.wt-tabs.nav-tabs a').on('shown.bs.tab', function (e) {
        var scrollPos = $('body').scrollTop();
        window.location.hash = e.target.hash;
        $('html,body').scrollTop(scrollPos);
    });

    // Append Tab hash to any forms that reside within a tab.
    $('.tab-content .tab-pane form').each(function () {
        var action = $(this).attr('action'),
            hash = $(this).parents('.tab-pane').attr('id');

        if (!action.match('#')) {
            $(this).attr('action', action+'#'+hash);
        }
    });
});
<commit_msg>fix scroll to top issue<commit_after>jQuery(function () {
    // Javascript to enable link to tab
    var url = document.location.toString();
    if (url.match('#')) {
        $('.wt-tabs.nav-tabs a[href="#'+url.split('#')[1]+'"]').tab('show') ;
    }

    // Change hash for page-reload
    $('.wt-tabs.nav-tabs a').on('shown.bs.tab', function (e) {
        var scrollPos = $('body').scrollTop();
        window.location.hash = e.target.hash;
        if (scrollPos !== 0) {
           $('html,body').scrollTop(scrollPos);
        }
    });

    // Append Tab hash to any forms that reside within a tab.
    $('.tab-content .tab-pane form').each(function () {
        var action = $(this).attr('action'),
            hash = $(this).parents('.tab-pane').attr('id');

        if (!action.match('#')) {
            $(this).attr('action', action+'#'+hash);
        }
    });
});

{'fraction_non_alphanumeric': 0.22228773584905662, 'fraction_numerical': 0.001768867924528302, 'mean_word_length': 2.367063492063492, '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': '4529479', 'n_tokens_mistral': 543, 'n_tokens_neox': 529, 'n_words': 109}