diff options
author | stale <redkugelblitzin@gmail.com> | 2022-05-29 21:38:34 -0300 |
---|---|---|
committer | stale <redkugelblitzin@gmail.com> | 2022-05-29 21:38:34 -0300 |
commit | c896f3a5f9b2e3f7f03ad1871b6566f098c0e295 (patch) | |
tree | e9e22fde8c3493de558fee5bdc8acf0aa76b09b5 /assets/client.js | |
parent | bcd5764aa03e128e06c355272b7b81eac8d4501d (diff) |
limit flood depth, quiet logs, fix board tx
Diffstat (limited to 'assets/client.js')
-rw-r--r-- | assets/client.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/assets/client.js b/assets/client.js index a6a2a73..e50ea9d 100644 --- a/assets/client.js +++ b/assets/client.js @@ -89,7 +89,15 @@ function connect() { function acceptBoard(data) { let vals = new Uint8Array(data); - board = Array.from(vals).reduce((s,c) => s + String.fromCodePoint(c), ""); + board = Array.from(vals).reduce((s,c) => { + let v = String.fromCodePoint(c); + if (v == ' ') { + s = s + " "; + } else { + s = s + v; + } + return s; + }, ""); let last = board[0]; let last_idx = 0; let split_board = []; |