diff --git a/springChatRoom/src/main/resources/static/js/main.js b/springChatRoom/src/main/resources/static/js/main.js index 028b43c76..c69f4ee6c 100644 --- a/springChatRoom/src/main/resources/static/js/main.js +++ b/springChatRoom/src/main/resources/static/js/main.js @@ -178,6 +178,15 @@ function updateOnlineUsers(users) { function startChat(username) { // Add your logic here to start a private chat with the selected user console.log('>>> Start chat with ' + username); + + // Open a popup window for the chat + const popupWindow = window.open('', '_blank', 'width=400,height=300'); + + // Add your logic to customize the popup window content + popupWindow.document.write('Chat with ' + username + ''); + popupWindow.document.write('

Chat with ' + username + '

'); + popupWindow.document.write('

This is the chat content. Customize it as needed.

'); + popupWindow.document.write(''); } // Call the fetchUserList function to initially populate the user list