{"size": 1180, "ext": "js", "max_stars_repo_path": "src/main/webapp/resources/static/js3/chatUiJs.js", "max_stars_repo_name": "sushant097/MultiLearningPlatform", "max_stars_repo_stars_event_min_datetime": "2018-09-26T15:27:39.000Z", "max_stars_repo_stars_event_max_datetime": "2018-10-02T14:52:52.000Z", "max_issues_repo_path": "src/main/webapp/resources/static/js3/chatUiJs.js", "max_issues_repo_name": "sushant097/MultiLearningPlatform", "max_issues_repo_issues_event_min_datetime": "2020-06-15T20:11:08.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T21:58:43.000Z", "max_forks_repo_path": "src/main/webapp/resources/static/js3/chatUiJs.js", "max_forks_repo_name": "sushant097/MultiLearningPlatform", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 25.652173913, "max_line_length": 104, "alphanum_fraction": 0.6966101695}
/**
 * 
 */



	
	
	var websocket = new WebSocket("ws://localhost:8080/GroupVideoMulticast/liveChatMessage");
	
	websocket.onopen = function(){
		console.log("You are connected to chat!");
	}
	var check = true;
	websocket.onmessage = function processMessage(message){
		var jsonData = JSON.parse(message.data);
		if(jsonData.message != null) textArea.value += jsonData.message + "\n";
		document.getElementById("textArea").setAttribute('style', 'background-color:#D0D0D0;display:block;')

	}
	websocket.onclose = function(){
		alert("You are Disconnected To Live Chat!")
	}
	function sendMessage(){
		websocket.send(messageText.value);
		messageText.value = "";
	}
	// get the input field
	var input = document.getElementById("messageText");
	
	input.addEventListener("keyup", function(event){
		
		//cancel the default action, if needed
		event.preventDefault();
		// Number 13 is the "Enter" key on the keyboard
		if(event.keyCode === 13){
			// Trigger the button button element with a click
			document.getElementById("sendBtn").click();
			
				document.getElementById("textArea").setAttribute('style', 'background-color:#F8F8F8;display:block;')
				
			
		}
	});

//	#F8F8F8