<commit_before>var color = getCookie("bg-color");
var shadow = getCookie("nav-shadow");
var isNavbarFixed = getCookie("nav-fixed") == "false" ? false : true;
if (color !== "") changeTheme(color);
if (shadow !== "") navShadow(shadow);
setNavbarFixed(isNavbarFixed);


function changeTheme(name) {
    document.body.className = "container-boxed " + (name == "white" ? "theme-red styled-scrollbar-colored" : "styled-scrollbar") + " bg-" + name + (isNavbarFixed ? " navbar-margin" : "");
    setCookie("bg-color", name, 60);
}

function navShadow(level) {
    document.getElementById("navbar").className = "navbar " + (isNavbarFixed ? "fixed-top " : "") + "shadow-" + level + " bg-green";
    setCookie("nav-shadow", level, 60);
}

function setNavbarFixed(isFixed) {
    var level = getCookie("nav-shadow");
    var color = getCookie("nav-shadow");
    if (level == "") level = 0;
    if (color == "") color = "white";

    document.getElementById("navbar").className = "navbar " + (isFixed ? "fixed-top " : "") + "shadow-" + level + " bg-green";
    document.body.className = "container-boxed " + (color == "white" ? "theme-red styled-scrollbar-colored" : "styled-scrollbar") + " bg-" + color + (isFixed ? " navbar-margin" : "");
    setCookie("nav-fixed", isFixed, 60);
}

function setCookie(cname, cvalue, exdays) {
    var d = new Date();
    d.setTime(d.getTime() + (exdays*24*60*60*1000));
    var expires = "expires="+ d.toUTCString();
    document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}

function getCookie(cname) {
    var name = cname + "=";
    var decodedCookie = decodeURIComponent(document.cookie);
    var ca = decodedCookie.split(';');
    for(var i = 0; i <ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1);
        }
        if (c.indexOf(name) == 0) {
            return c.substring(name.length, c.length);
        }
    }<commit_msg>Small fix in the index.js test<commit_after>var color = getCookie("bg-color");
var shadow = getCookie("nav-shadow");
var isNavbarFixed = getCookie("nav-fixed") == "false" ? false : true;
if (color !== "") changeTheme(color);
if (shadow !== "") navShadow(shadow);
setNavbarFixed(isNavbarFixed);


function changeTheme(name) {
    document.body.className = "container-boxed " + (name == "white" ? "theme-red styled-scrollbar-colored" : "styled-scrollbar") + " bg-" + name + (isNavbarFixed ? " navbar-margin" : "");
    setCookie("bg-color", name, 60);
}

function navShadow(level) {
    document.getElementById("navbar").className = "navbar " + (isNavbarFixed ? "fixed-top " : "") + "shadow-" + level + " bg-green";
    setCookie("nav-shadow", level, 60);
}

function setNavbarFixed(isFixed) {
    var level = getCookie("nav-shadow");
    var color = getCookie("nav-shadow");
    if (level == "") level = 2;
    if (color == "") color = "white";

    document.getElementById("navbar").className = "navbar " + (isFixed ? "fixed-top " : "") + "shadow-" + level + " bg-green";
    document.body.className = "container-boxed " + (color == "white" ? "theme-red styled-scrollbar-colored" : "styled-scrollbar") + " bg-" + color + (isFixed ? " navbar-margin" : "");
    setCookie("nav-fixed", isFixed, 60);
}

function setCookie(cname, cvalue, exdays) {
    var d = new Date();
    d.setTime(d.getTime() + (exdays*24*60*60*1000));
    var expires = "expires="+ d.toUTCString();
    document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}

function getCookie(cname) {
    var name = cname + "=";
    var decodedCookie = decodeURIComponent(document.cookie);
    var ca = decodedCookie.split(';');
    for(var i = 0; i <ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1);
        }
        if (c.indexOf(name) == 0) {
            return c.substring(name.length, c.length);
        }
    }
{'fraction_non_alphanumeric': 0.19525406241939644, 'fraction_numerical': 0.010833118390508125, 'mean_word_length': 3.381920903954802, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6210641', 'n_tokens_mistral': 1334, 'n_tokens_neox': 1282, 'n_words': 271}