<commit_before>var keyboardNavigation = (function () {
    var getPosition = function ($release) {
        var releasePosition = $release.position().top;
        var navbarHeight = $('.navbar').outerHeight();
        var spacer = 10;
        return Math.floor(releasePosition - navbarHeight - spacer);
    };

    var goToPreviousRelease = function () {
        var $previousRelease = $('.release').filter(function (index) {
            return $(window).scrollTop() > getPosition($(this));
        }).last();
<commit_msg>Make j/k navigation work better when the menu isn't fixed<commit_after>var keyboardNavigation = (function () {
    var getPosition = function ($release) {
        var releasePosition = $release.position().top;
        var navbarHeight = 0;
        if ($('.navbar').css('position') === 'fixed') {
          navbarHeight = $('.navbar').outerHeight();
        }
        var spacer = 10;
        return Math.floor(releasePosition - navbarHeight - spacer);
    };

    var goToPreviousRelease = function () {
        var $previousRelease = $('.release').filter(function (index) {
            return $(window).scrollTop() > getPosition($(this));
        }).last();

{'fraction_non_alphanumeric': 0.15084745762711865, 'fraction_numerical': 0.00423728813559322, 'mean_word_length': 2.78525641025641, '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': '6243410', 'n_tokens_mistral': 317, 'n_tokens_neox': 296, 'n_words': 76}