diff options
author | stale <redkugelblitzin@gmail.com> | 2022-05-29 23:56:03 -0300 |
---|---|---|
committer | stale <redkugelblitzin@gmail.com> | 2022-05-29 23:56:03 -0300 |
commit | b1fd887402e4577cbb630fc6517cf9cd6e0d7c8f (patch) | |
tree | 7018603244d38a361f86aa0b1a6ea11ea39f27c6 /assets | |
parent | c896f3a5f9b2e3f7f03ad1871b6566f098c0e295 (diff) |
compression! also bumped edition
Diffstat (limited to 'assets')
-rw-r--r-- | assets/client.js | 5 | ||||
-rw-r--r-- | assets/room.html | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/assets/client.js b/assets/client.js index e50ea9d..7c89495 100644 --- a/assets/client.js +++ b/assets/client.js @@ -88,8 +88,9 @@ function connect() { } function acceptBoard(data) { - let vals = new Uint8Array(data); - board = Array.from(vals).reduce((s,c) => { + let dataarr = new Uint8Array(data); + let vals = fflate.inflateSync(dataarr); + board = vals.reduce((s,c) => { let v = String.fromCodePoint(c); if (v == ' ') { s = s + " "; diff --git a/assets/room.html b/assets/room.html index e3e6ff9..d96bb77 100644 --- a/assets/room.html +++ b/assets/room.html @@ -14,5 +14,6 @@ <p id="miscinfo">Loading...</p> </div> </body> + <script src="https://unpkg.com/fflate"></script> <script src="/c.js"></script> </html> |