{"size": 1066, "ext": "js", "max_stars_repo_path": "js/settings.js", "max_stars_repo_name": "af-not-found/nad11util", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/settings.js", "max_issues_repo_name": "af-not-found/nad11util", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/settings.js", "max_forks_repo_name": "af-not-found/nad11util", "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": 31.3529411765, "max_line_length": 64, "alphanum_fraction": 0.6510318949}
app.init = function() {

	$("#cancel").click(function() {
		chrome.app.window.current().close();
	});

	$("#save").click(function() {
		app.settings.password = $("#password").val();
		app.settings.interval = $("#interval").val();
		app.settings.cb_notif = $("#cb_notif").prop("checked");
		app.settings.batt_notif_over = $("#batt_notif_over").val();
		app.settings.batt_notif_under = $("#batt_notif_under").val();
		app.settings.reconn_interval = $("#reconn_interval").val();

		chrome.storage.sync.set(app.settings);

		chrome.app.window.current().close();
	});

	chrome.storage.sync.get(app.settings, function(settings) {
		app.settings = settings;

		$("#password").val(app.settings.password);
		$("#interval").val(app.settings.interval);
		$("#cb_notif").prop("checked", app.settings.cb_notif);
		$("#batt_notif_over").val(app.settings.batt_notif_over);
		$("#batt_notif_under").val(app.settings.batt_notif_under);
		$("#reconn_interval").val(app.settings.reconn_interval);
	});
}

$(document).ready(function() {
	app.init();
});