{"size": 916, "ext": "js", "max_stars_repo_path": "_src/assets/js/fill-email.js", "max_stars_repo_name": "rodriguezmontesinoseva/f-m2-disena-tu-aventura", "max_stars_repo_stars_event_min_datetime": "2019-05-27T14:00:20.000Z", "max_stars_repo_stars_event_max_datetime": "2019-05-27T14:00:20.000Z", "max_issues_repo_path": "_src/assets/js/fill-email.js", "max_issues_repo_name": "Adalab/f-m2-group4", "max_issues_repo_issues_event_min_datetime": "2019-04-10T18:33:11.000Z", "max_issues_repo_issues_event_max_datetime": "2019-05-07T17:50:18.000Z", "max_forks_repo_path": "_src/assets/js/fill-email.js", "max_forks_repo_name": "Adalab/f-m2-group4", "max_forks_repo_forks_event_min_datetime": "2019-05-07T13:52:55.000Z", "max_forks_repo_forks_event_max_datetime": "2019-05-27T14:00:03.000Z"}
{"max_stars_count": 1, "max_issues_count": 7, "max_forks_count": 5, "avg_line_length": 30.5333333333, "max_line_length": 74, "alphanum_fraction": 0.7085152838}
// EMAIL //

const emailLink = document.querySelector('#email');
const emailPreviewLink = document.querySelector('.email__card');

// recojer el icono de la tarjeta preview de Linkdin:
const previewIconEmail = document.querySelector('.email-icon');

function changeEmailOnCard (event){
    const emailHref = emailLink.value;
    
    //Fill the userData object with this value when is selected
    const key = event.currentTarget.name;
    const value = emailHref;
    fillUserDataObject(key,value);
        
    // Si no hay e-mail, el href no se genera //
    if (!emailHref){
    emailPreviewLink.removeAttribute("href");
    }
    // Si lo hay, se crea //
    else {
    emailPreviewLink.href = `mailto:${emailHref}`;

    //llamar funccion que le añade la clase addBoxShadow__IfInputIsFIlled 
    addBoxshadowifFilled(emailLink,previewIconEmail);
    }
}
emailLink.addEventListener('keyup', changeEmailOnCard);
