From 852474350bdd708344857488543fc8b912977a89 Mon Sep 17 00:00:00 2001 From: TrueKuehli Date: Thu, 11 Oct 2018 17:14:18 +0200 Subject: Redirect doesn't change head anymore Now uses body.innerHTML for replacing content. -> In light of document.write being one of the main target for Google's attempts at making the Chrome Browser more performant -> Additionally this may or may not fix an issue --- WebInterface/NodeJSServer/src/modules/ui/login-modal.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'WebInterface/NodeJSServer/src/modules/ui/login-modal.js') diff --git a/WebInterface/NodeJSServer/src/modules/ui/login-modal.js b/WebInterface/NodeJSServer/src/modules/ui/login-modal.js index 0bfd70d..13de78e 100644 --- a/WebInterface/NodeJSServer/src/modules/ui/login-modal.js +++ b/WebInterface/NodeJSServer/src/modules/ui/login-modal.js @@ -152,14 +152,19 @@ export default class LoginModal extends Modal { 'play#game=' + this.serverName); fetch('play').then((response) => { response.text().then((htmlString) => { + // Replace all references, since we're starting one level farther up htmlString = htmlString.replace(/\.\.\//g, './'); + htmlString = /((.)|(\n))*<\/body>/g.exec(htmlString)[0]; htmlString = htmlString.replace(/