{"size": 651, "ext": "js", "max_stars_repo_path": "showHide.js", "max_stars_repo_name": "OussaZaki/smartcoding-password", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "showHide.js", "max_issues_repo_name": "OussaZaki/smartcoding-password", "max_issues_repo_issues_event_min_datetime": "2018-07-10T16:40:22.000Z", "max_issues_repo_issues_event_max_datetime": "2018-07-13T12:50:24.000Z", "max_forks_repo_path": "showHide.js", "max_forks_repo_name": "OussaZaki/smartcoding-password", "max_forks_repo_forks_event_min_datetime": "2018-11-21T09:08:49.000Z", "max_forks_repo_forks_event_max_datetime": "2018-11-21T09:08:49.000Z"}
{"max_stars_count": null, "max_issues_count": 11, "max_forks_count": 1, "avg_line_length": 31.0, "max_line_length": 91, "alphanum_fraction": 0.6513056836}
var showIcon = document.getElementById('icon'); // Gets the show/hide icon element.
var passwordInput = document.getElementById('password'); // Get the password input element.

showIcon.addEventListener('click', function () {
    showHidePassword();
});

function showHidePassword() {
    if (passwordInput.type === 'password') {
        passwordInput.setAttribute('type', 'text');
        // showIcon.innerHTML = "Hide";
        showIcon.className = "fa fa-eye show-icon";
    } else {
        passwordInput.setAttribute('type', 'password');
        // showIcon.innerHTML = "Show";
        showIcon.className = "fa fa-eye-slash show-icon";
    }
}


