From 5fb0870c95d0f40b1db85c9bdfb97a74c787c8de Mon Sep 17 00:00:00 2001 From: Kum1ta Date: Tue, 8 Oct 2024 03:20:26 +0200 Subject: [PATCH] Game - quit vr when game finish Site - fix xss on live chat --- .../multiOnlineGame/multiOnlineGamePage.js | 8 +++++++- .../static/javascript/typeResponse/typeGame.js | 14 ++------------ .../typeResponse/typeNewPrivateMessage.js | 15 +++++++++------ .../nginx/static/javascript/websocket.js | 3 ++- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docker-compose/requirements/nginx/static/javascript/multiOnlineGame/multiOnlineGamePage.js b/docker-compose/requirements/nginx/static/javascript/multiOnlineGame/multiOnlineGamePage.js index e92b789..3747b5e 100644 --- a/docker-compose/requirements/nginx/static/javascript/multiOnlineGame/multiOnlineGamePage.js +++ b/docker-compose/requirements/nginx/static/javascript/multiOnlineGame/multiOnlineGamePage.js @@ -6,7 +6,7 @@ /* By: edbernar { - if(e.key == 'q') - { - console.log("stopped server updates") - stopSrvUpdate = true - } -}); function typeGame(content) { - if(stopSrvUpdate) - return + console.log(`New game ${content.action} content: `, content); if (pageRenderer.actualPage == WaitingGamePage) { if (content.action == 1) diff --git a/docker-compose/requirements/nginx/static/javascript/typeResponse/typeNewPrivateMessage.js b/docker-compose/requirements/nginx/static/javascript/typeResponse/typeNewPrivateMessage.js index 8915fb4..27cdf15 100644 --- a/docker-compose/requirements/nginx/static/javascript/typeResponse/typeNewPrivateMessage.js +++ b/docker-compose/requirements/nginx/static/javascript/typeResponse/typeNewPrivateMessage.js @@ -6,7 +6,7 @@ /* By: edbernar -

${content.content}

+ div.className = content.from === userMeInfo.id ? "meMessage" : "opponentMessage"; + div.innerHTML = ` +

${content.date}

- - `); + `; + div.getElementsByClassName('content')[0].innerText = content.content; + infoPanel.divMessage.appendChild(div); infoPanel.divMessage.scrollTop = infoPanel.divMessage.scrollHeight; } else if (content.from != userMeInfo.id) diff --git a/docker-compose/requirements/nginx/static/javascript/websocket.js b/docker-compose/requirements/nginx/static/javascript/websocket.js index 4987597..1058947 100644 --- a/docker-compose/requirements/nginx/static/javascript/websocket.js +++ b/docker-compose/requirements/nginx/static/javascript/websocket.js @@ -6,7 +6,7 @@ /* By: edbernar