<commit_before>Kwf.onContentReady(function linkTagIntern(el){
    var links = $(el).find('a');

    if(links && links.length) {
        $.each(links, function(i, link){
            if($(link).data('checkIntern')) return;
            $(link).data('checkIntern', true);
            var pos = $(link).attr('href') ? $(link).attr('href').indexOf('#') : null;
            if (pos > 0 && $(link).attr('href').substr(0, 1) == '/') {
                var target = $($(link).attr('href').substr(pos));
                if (target && target.length) {
                    $(link).click(function(e){
                        e.preventDefault();
                        $('html, body').stop().animate({scrollTop: target.offset().top}, 500, function() {
                            window.location.hash = $(link).attr('href').substr(pos);
                        });
                    });
                }
            }
        });
    }
}, { defer: true });<commit_msg>Change anchorLink (smooth-scroll) function to onJElementReady - use the anchor tag directly<commit_after>Kwf.onJElementReady('a', function anchorLinks(el) {
    var pos = $(el).attr('href') ? $(el).attr('href').indexOf('#') : null;
    if (pos > 0 && $(el).attr('href').substr(0, 1) == '/') {
        var target = $($(el).attr('href').substr(pos));
        if (target && target.length) {
            $(el).click(function(e){
                e.preventDefault();
                $('html, body').stop().animate({scrollTop: target.offset().top}, 500, function() {
                    window.location.hash = $(el).attr('href').substr(pos);
                });
            });
        }
    }
}, {defer: true});
{'fraction_non_alphanumeric': 0.20710415412402167, 'fraction_numerical': 0.007224563515954244, 'mean_word_length': 1.8804159445407278, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '958224', 'n_tokens_mistral': 487, 'n_tokens_neox': 457, 'n_words': 81}