{"size": 542, "ext": "js", "max_stars_repo_path": "web/static/js/features/forms.js", "max_stars_repo_name": "ClubNix/academy", "max_stars_repo_stars_event_min_datetime": "2016-06-18T17:46:14.000Z", "max_stars_repo_stars_event_max_datetime": "2020-01-21T03:19:41.000Z", "max_issues_repo_path": "web/static/js/features/forms.js", "max_issues_repo_name": "ClubNix/academy", "max_issues_repo_issues_event_min_datetime": "2016-06-18T18:05:43.000Z", "max_issues_repo_issues_event_max_datetime": "2018-03-06T08:19:41.000Z", "max_forks_repo_path": "web/static/js/features/forms.js", "max_forks_repo_name": "ClubNix/academy", "max_forks_repo_forks_event_min_datetime": "2016-10-26T19:51:06.000Z", "max_forks_repo_forks_event_max_datetime": "2018-09-18T09:06:14.000Z"}
{"max_stars_count": 3, "max_issues_count": 18, "max_forks_count": 3, "avg_line_length": 20.8461538462, "max_line_length": 65, "alphanum_fraction": 0.7380073801}
import "phoenix_html"

function addFilledClass(element) {
	if(element.value == "") {
		element.classList.remove("filled");
	} else {
		element.classList.add("filled");
	}
}

function addFilledClassWrapper(event) {
	addFilledClass(event.target);
}

function watchForInputFilling() {
	let inputElements = document.querySelectorAll(".input > input");
	for(let element of inputElements) {
		addFilledClass(element);
		element.addEventListener("blur", addFilledClassWrapper);
	}
}

export var setup = function(config) {
	watchForInputFilling();
}
