<commit_before>//= require_tree .

$(document).ready(function() {
    // Build navigation list
    var articleOutline = createOutlineFromElement($('.content').eq(0));
    var navList = createArticleNavigationFromOutline(articleOutline);
    $("#document-outline").append(navList);

    // Scroll affix  
    fixElement($(".sidebar"), 50);
});

function fixElement(element, offset) {
    if(element.length == 0) return;

    var affixWaypoint = element.offset().top - offset;

    $(window).scroll(function(event) {<commit_msg>Added a check to prevent creation of document outline when no sidebar is present.<commit_after>//= require_tree .

$(document).ready(function() {
    // Build navigation list
    var documentOutlineElement = $("#document-outline");

    if(documentOutlineElement.length) {
        var articleOutline = createOutlineFromElement($('.content').eq(0));
        var navList = createArticleNavigationFromOutline(articleOutline);
        documentOutlineElement.append(navList);
    }

    // Scroll affix
    fixElement($(".sidebar"), 50);
});

function fixElement(element, offset) {
    if(element.length == 0) return;

    var affixWaypoint = element.offset().top - offset;

    $(window).scroll(function(event) {
{'fraction_non_alphanumeric': 0.14424635332252836, 'fraction_numerical': 0.006482982171799027, 'mean_word_length': 4.020325203252033, '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': '4181975', 'n_tokens_mistral': 361, 'n_tokens_neox': 341, 'n_words': 73}