From d7d6f0503b1fdf23c4742274851c175135957b68 Mon Sep 17 00:00:00 2001 From: Shagnor Date: Fri, 23 Dec 2022 21:36:45 +1100 Subject: [PATCH] Support sending less_explicit_mode for app store users --- .gitignore | 1 + src/index.ts | 4 +++- update-deps.sh | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b23d6c4..5b8c018 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ assets/main.js dist node_modules +assets/xterm.css \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 7a6c823..a181073 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,6 +29,8 @@ function connectTerm() { const wsurl = document.location.href.replace(/^https:\/\/(.*)\/game(.html)?(\?.*)?(\#.*)?/, 'wss:\/\/$1/wsgame'); let webSocket = new WebSocket(wsurl); webSocket.addEventListener('open', (event) => { + if (sendLessExplicit) + webSocket.send("less_explicit_mode"); fit.fit(); lineHandler = (l: string) => { console.log("Send handler", l); webSocket.send(l); } term.writeln("\x1b[0mConnected"); @@ -43,7 +45,7 @@ function connectTerm() { webSocket.addEventListener('message', (msg) => { fit.fit(); term.write(msg.data); - }) + }); } function over18() { diff --git a/update-deps.sh b/update-deps.sh index c78643d..96f5243 100755 --- a/update-deps.sh +++ b/update-deps.sh @@ -1,4 +1,5 @@ #!/bin/bash npx webpack +cp ./node_modules/xterm/css/xterm.css ./assets/ cp dist/main.js ./assets/main.js