<commit_before>// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
document.onreadystatechange = function () {
    if (document.readyState == "interactive") {
        initApplication();
    }
}

function initApplication(){
    var appended = false, up_arrow = document.querySelector("#up");

    onscroll = function () {
        var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;

        if (scrollTop < -5) {
            console.log('scrolled', scrollTop, appended);
            var old_value = parseInt(getPageVar('n'));
            var new_value = (old_value * 1.1).toFixed();

            var query = location.pathname + 'grep' + location.search.replace('n=' + old_value, 'n=' + new_value);
//            sendRequest(query, false)
            console.log('scrolled', query);
        }
        if (scrollTop > 500) {
            if (!appended) {
                up_arrow.hidden = false;
                appended = true;
            }
        } else {
            if (appended) {
                up_arrow.hidden = true;
                appended = false;
            }
        }
    };

}

function getPageVar(sVar) {<commit_msg>loading on scroll up removed<commit_after>// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
document.onreadystatechange = function () {
    if (document.readyState == "interactive") {
        initApplication();
    }
}

function initApplication(){
    var appended = false, up_arrow = document.querySelector("#up");

    onscroll = function () {
        var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
        if (scrollTop > 500) {
            if (!appended) {
                up_arrow.hidden = false;
                appended = true;
            }
        } else {
            if (appended) {
                up_arrow.hidden = true;
                appended = false;
            }
        }
    };

}

function getPageVar(sVar) {
{'fraction_non_alphanumeric': 0.110269758637009, 'fraction_numerical': 0.004259346900141978, 'mean_word_length': 2.007112375533428, 'pattern_counts': {'":': 0, '<': 4, '<?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': '3812482', 'n_tokens_mistral': 576, 'n_tokens_neox': 556, 'n_words': 147}