<commit_before>var login_placeholder_state = false;

function toggle_login_placeholder() {
    if (login_placeholder_state) {
        $(".bt-menu.bt-menu-open").animate({"background-color": "rgba(0, 0, 0, 0.3)"})
    } else {
        $(".bt-menu.bt-menu-open").animate({"background-color": "rgba(0, 0, 0, 0.9)"})
    }
    $("#login_placeholder_table").toggle();
    login_placeholder_state = !login_placeholder_state
}

function display_login_placeholder(n) {
    if (n === 2) {
        $("#login_placeholder_first_page").css('display', 'none');
        $("#login_placeholder_third_page").css('display', 'none');
        $("#login_placeholder_second_page").css('display', 'block');
    } else if (n === 1) {
        $("#login_placeholder_first_page").css('display', 'block');
        $("#login_placeholder_second_page").css('display', 'none');
        $("#login_placeholder_third_page").css('display', 'none');
    } else if (n === 3) {
        $("#login_placeholder_first_page").css('display', 'none');
        $("#login_placeholder_second_page").css('display', 'none');
        $("#login_placeholder_third_page").css('display', 'block');
    }
}

$("#login_tick").click(function () {
    var email_value = $("#login_placeholder_username").val();
    var password_value = $("#login_placeholder_password").val();
    var crf = $("#login_placeholder_crf").val();

    $.post("/login/", {
        email: email_value,
        password: <PASSWORD>,
        csrfmiddlewaretoken: crf
    }).done(function (data) {
        if (data === "ok") {
            window.location = '/profile';
        } else if (data === "bad") {
            $("#login_placeholder_error").empty().html("Неверная почта или пароль");
        } else if (data === "email") {
            alert("Lol kek email cheburek");
            $("#login_placeholder_error").empty().html("Письмо с ссылкой на активацию профиля было выслано");
        }
    });
});


$("#login_placeholder_register_register_button").click(function () {

    var names = $("#login_placeholder_register_names").val();
    var email = $("#login_placeholder_register_email").val();
    var password = $("#login_placeholder_register_password").val();
    var crf = $("#login_placeholder_crf").val();

    var first_name = names.split(" ")[0];
    var last_name = names.split(" ")[1];

    $.post("/register/", {
        first_name: first_name,
        last_name: last_name,
        email: email,
        password: password,
        csrfmiddlewaretoken: crf
    }).done(function (data) {
        console.log(data);<commit_msg>Add относительные paths in javascript<commit_after>var login_placeholder_state = false;

function toggle_login_placeholder() {
    if (login_placeholder_state) {
        $(".bt-menu.bt-menu-open").animate({"background-color": "rgba(0, 0, 0, 0.3)"})
    } else {
        $(".bt-menu.bt-menu-open").animate({"background-color": "rgba(0, 0, 0, 0.9)"})
    }
    $("#login_placeholder_table").toggle();
    login_placeholder_state = !login_placeholder_state
}

function display_login_placeholder(n) {
    if (n === 2) {
        $("#login_placeholder_first_page").css('display', 'none');
        $("#login_placeholder_third_page").css('display', 'none');
        $("#login_placeholder_second_page").css('display', 'block');
    } else if (n === 1) {
        $("#login_placeholder_first_page").css('display', 'block');
        $("#login_placeholder_second_page").css('display', 'none');
        $("#login_placeholder_third_page").css('display', 'none');
    } else if (n === 3) {
        $("#login_placeholder_first_page").css('display', 'none');
        $("#login_placeholder_second_page").css('display', 'none');
        $("#login_placeholder_third_page").css('display', 'block');
    }
}

$("#login_tick").click(function () {
    var email_value = $("#login_placeholder_username").val();
    var password_value = $("#login_placeholder_password").val();
    var crf = $("#login_placeholder_crf").val();

    $.post("../login/", {
        email: email_value,
        password: <PASSWORD>,
        csrfmiddlewaretoken: crf
    }).done(function (data) {
        if (data === "ok") {
            window.location = '/profile';
        } else if (data === "bad") {
            $("#login_placeholder_error").empty().html("Неверная почта или пароль");
        } else if (data === "email") {
            alert("Lol kek email cheburek");
            $("#login_placeholder_error").empty().html("Письмо с ссылкой на активацию профиля было выслано");
        }
    });
});


$("#login_placeholder_register_register_button").click(function () {

    var names = $("#login_placeholder_register_names").val();
    var email = $("#login_placeholder_register_email").val();
    var password = $("#login_placeholder_register_password").val();
    var crf = $("#login_placeholder_crf").val();

    var first_name = names.split(" ")[0];
    var last_name = names.split(" ")[1];

    $.post("../register/", {
        first_name: first_name,
        last_name: last_name,
        email: email,
        password: password,
        csrfmiddlewaretoken: crf
    }).done(function (data) {
        console.log(data);
{'fraction_non_alphanumeric': 0.18910505836575875, 'fraction_numerical': 0.005836575875486381, 'mean_word_length': 3.4357204486626403, 'pattern_counts': {'":': 4, '<': 5, '<?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': '2739525', 'n_tokens_mistral': 1576, 'n_tokens_neox': 1588, 'n_words': 273}