<commit_before>// change layout based on amount of Y scroll
var startProductBarPos=-1;

window.onscroll=function(){
    if(window.innerWidth > 960) {
        var nav = document.getElementById('video-navigation');
        var con = document.getElementById('video-frame');
        // var gotovideo = document.getElementById('gotovideo');
        var phonemesO = document.getElementById('gotophonemes-original');
        var phonemes = document.getElementById('gotophonemes');
        var recbuttons = document.getElementsByClassName('recorder');
        var entryContent = document.getElementsByClassName('entry-content')[0];
        var clusters = document.getElementById('clusters');
        var clustersTop = findPosY(clusters);
        var navtop;
        var contop;
        if(window.innerWidth > 1242){
            navtop = '75px';
            contop = 125;
        }else{
            navtop = 0;
            contop = 75;
        }

        if(startProductBarPos<0)startProductBarPos=findPosY(nav);
        if(pageYOffset>startProductBarPos){
            nav.style.position='fixed';
            nav.style.top=navtop;
            nav.style.display='flex';
            nav.style.width='100%';
            nav.style.height='2em';
            nav.style.lineHeight='1em';
            // gotovideo.style.display='inherit';
            phonemes.style.display='inherit';
            phonemesO.style.display='none';
            con.style.position='fixed';
            con.style.top=contop+'px';
            if(pageYOffset>clustersTop){
                con.style.top=(contop-pageYOffset+clustersTop)+'px';
            }
            con.style.right='5px';
            con.style.width='30%';
            entryContent.style.position='relative';
            entryContent.style.left='-20%';
            if(window.innerWidth < 1100) {
                con.style.width='20%';
                entryContent.style.left='-12%';
            }

            for (var i=1; i < recbuttons.length; i++) recbuttons[i].style.margin='0 5px';
        }else{
            nav.style.position='relative';
            nav.style.top=0;
            nav.style.display='inline-block';
            nav.style.width='30%';
            nav.style.height='inherit';
            nav.style.lineHeight='inherit';
            // gotovideo.style.display='none';
            phonemes.style.display='none';
            phonemesO.style.display='inherit';
            con.style.position='relative';
            con.style.top=0;
            con.style.right=0;
            con.style.width='70%';
            entryContent.style.position='inherit';
            entryContent.style.left=0;
            for (var i=1; i < recbuttons.length; i++) recbuttons[i].style.margin='25px 5px';
        }
    }else{
        var vid = document.getElementById('video-frame');
        var navmobile = document.getElementById('video-navigation-mobile');
        if(pageYOffset>vid.offsetTop){
            navmobile.style.display='flex';
        }else{
            navmobile.style.display='none';
        }
    }

};

function findPosY(obj) {
    var curtop = 0;
    if (typeof (obj.offsetParent) != 'undefined' && obj.offsetParent) {
        while (obj.offsetParent) {<commit_msg>layout change also triggered on window resize<commit_after>// change layout based on amount of Y scroll
var startProductBarPos=-1;

function moveThings() {
    if(window.innerWidth > 960) {
        var nav = document.getElementById('video-navigation');
        var con = document.getElementById('video-frame');
        // var gotovideo = document.getElementById('gotovideo');
        var phonemesO = document.getElementById('gotophonemes-original');
        var phonemes = document.getElementById('gotophonemes');
        var recbuttons = document.getElementsByClassName('recorder');
        var entryContent = document.getElementsByClassName('entry-content')[0];
        var clusters = document.getElementById('clusters');
        var clustersTop = findPosY(clusters);
        var navtop;
        var contop;
        if(window.innerWidth > 1242){
            navtop = '75px';
            contop = 125;
        }else{
            navtop = 0;
            contop = 75;
        }

        if(startProductBarPos<0)startProductBarPos=findPosY(nav);
        if(pageYOffset>startProductBarPos){
            nav.style.position='fixed';
            nav.style.top=navtop;
            nav.style.display='flex';
            nav.style.width='100%';
            nav.style.height='2em';
            nav.style.lineHeight='1em';
            // gotovideo.style.display='inherit';
            phonemes.style.display='inherit';
            phonemesO.style.display='none';
            con.style.position='fixed';
            con.style.top=contop+'px';
            if(pageYOffset>clustersTop){
                con.style.top=(contop-pageYOffset+clustersTop)+'px';
            }
            con.style.right='5px';
            con.style.width='30%';
            entryContent.style.position='relative';
            entryContent.style.left='-20%';
            if(window.innerWidth < 1100) {
                con.style.width='20%';
                entryContent.style.left='-12%';
            }

            for (var i=1; i < recbuttons.length; i++) recbuttons[i].style.margin='0 5px';
        }else{
            nav.style.position='relative';
            nav.style.top=0;
            nav.style.display='inline-block';
            nav.style.width='30%';
            nav.style.height='inherit';
            nav.style.lineHeight='inherit';
            // gotovideo.style.display='none';
            phonemes.style.display='none';
            phonemesO.style.display='inherit';
            con.style.position='relative';
            con.style.top=0;
            con.style.right=0;
            con.style.width='70%';
            entryContent.style.position='inherit';
            entryContent.style.left=0;
            for (var i=1; i < recbuttons.length; i++) recbuttons[i].style.margin='25px 5px';
        }
    }else{
        var vid = document.getElementById('video-frame');
        var navmobile = document.getElementById('video-navigation-mobile');
        if(pageYOffset>vid.offsetTop){
            navmobile.style.display='flex';
        }else{
            navmobile.style.display='none';
        }
    }
}

window.onscroll=function(){
    moveThings();
};

window.onresize=function(){
    moveThings();
};

function findPosY(obj) {
    var curtop = 0;
    if (typeof (obj.offsetParent) != 'undefined' && obj.offsetParent) {
        while (obj.offsetParent) {
{'fraction_non_alphanumeric': 0.13623853211009174, 'fraction_numerical': 0.015902140672782873, 'mean_word_length': 2.06657290201594, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '96899', 'n_tokens_mistral': 1922, 'n_tokens_neox': 1843, 'n_words': 279}