summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorstale <redkugelblitzin@gmail.com>2022-05-29 21:38:34 -0300
committerstale <redkugelblitzin@gmail.com>2022-05-29 21:38:34 -0300
commitc896f3a5f9b2e3f7f03ad1871b6566f098c0e295 (patch)
treee9e22fde8c3493de558fee5bdc8acf0aa76b09b5 /assets
parentbcd5764aa03e128e06c355272b7b81eac8d4501d (diff)
limit flood depth, quiet logs, fix board tx
Diffstat (limited to 'assets')
-rw-r--r--assets/client.js10
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 + "&nbsp";
+ } else {
+ s = s + v;
+ }
+ return s;
+ }, "");
let last = board[0];
let last_idx = 0;
let split_board = [];