{"size": 1283, "ext": "js", "max_stars_repo_path": "assets/js/socialMedia.js", "max_stars_repo_name": "PikkaPikkachu/socialMedia", "max_stars_repo_stars_event_min_datetime": "2018-07-16T01:48:31.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-16T17:12:57.000Z", "max_issues_repo_path": "assets/js/socialMedia.js", "max_issues_repo_name": "PikkaPikkachu/socialMedia", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assets/js/socialMedia.js", "max_forks_repo_name": "PikkaPikkachu/socialMedia", "max_forks_repo_forks_event_min_datetime": "2019-05-20T01:02:01.000Z", "max_forks_repo_forks_event_max_datetime": "2019-05-20T01:02:01.000Z"}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 21.3833333333, "max_line_length": 107, "alphanum_fraction": 0.6001558846}
$(document).ready(function() {

	//Button for profile post
	$('#submit_profile_post').click(function(){
		
		$.ajax({
			type: "POST",
			url: "includes/handlers/ajax_submit_profile_post.php",
			data: $('form.profile_post').serialize(),
			success: function(msg) {
				$("#post_form").modal('hide');
				location.reload();
			},
			error: function() {
				alert('Failure');
			}
		});

	});


});



function getDropdownData(user, type) {

	if($(".dropdown_data_window").css("height") == "0px") {

		var pageName;

		if(type == 'notification') {
			pageName = "ajax_load_notifications.php";
			$("span").remove("#unread_notification");
		}else if (type == 'message') {
			pageName = "ajax_load_messages.php";
			$("span").remove("#unread_message");
		}

		var ajaxreq = $.ajax({
			url: "includes/handlers/" + pageName,
			type: "POST",
			data: "page=1&userLoggedIn=" + user,
			cache: false,

			success: function(response) {
				$(".dropdown_data_window").html(response);
				$(".dropdown_data_window").css({"padding" : "0px", "height": "280px", "border" : "1px solid #DADADA"});
				$("#dropdown_data_type").val(type);
			}

		});

	}
	else {
		$(".dropdown_data_window").html("");
		$(".dropdown_data_window").css({"padding" : "0px", "height": "0px", "border" : "none"});
	}

}