Don't send obsolete less_explicit_mode
This commit is contained in:
parent
9cc8f833d6
commit
c6808f6538
2
build.sh
2
build.sh
@ -1,7 +1,5 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
npm install -g npm
|
|
||||||
|
|
||||||
npm install -Dy
|
npm install -Dy
|
||||||
npm -y exec webpack
|
npm -y exec webpack
|
||||||
cp ./node_modules/xterm/css/xterm.css ./assets/
|
cp ./node_modules/xterm/css/xterm.css ./assets/
|
||||||
|
@ -2,8 +2,6 @@ import {Terminal} from 'xterm';
|
|||||||
import { Readline } from "xterm-readline";
|
import { Readline } from "xterm-readline";
|
||||||
import { FitAddon } from 'xterm-addon-fit';
|
import { FitAddon } from 'xterm-addon-fit';
|
||||||
|
|
||||||
let isScreened = false, sendLessExplicit = false;
|
|
||||||
|
|
||||||
const term = new Terminal();
|
const term = new Terminal();
|
||||||
const rl = new Readline();
|
const rl = new Readline();
|
||||||
term.options.scrollback = 1000;
|
term.options.scrollback = 1000;
|
||||||
@ -35,8 +33,6 @@ function connectTerm() {
|
|||||||
"wss://ws.blastmud.org/wsgame" : params.wsurl;
|
"wss://ws.blastmud.org/wsgame" : params.wsurl;
|
||||||
let webSocket = new WebSocket(wsurl);
|
let webSocket = new WebSocket(wsurl);
|
||||||
webSocket.addEventListener('open', (event) => {
|
webSocket.addEventListener('open', (event) => {
|
||||||
if (sendLessExplicit)
|
|
||||||
webSocket.send("less_explicit_mode");
|
|
||||||
fit.fit();
|
fit.fit();
|
||||||
lineHandler = (l: string) => { console.log("Send handler", l); webSocket.send(l); }
|
lineHandler = (l: string) => { console.log("Send handler", l); webSocket.send(l); }
|
||||||
term.writeln("\x1b[0mConnected");
|
term.writeln("\x1b[0mConnected");
|
||||||
@ -56,6 +52,3 @@ function connectTerm() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ('serviceWorker' in navigator) navigator.serviceWorker.register('service-worker.js');
|
if ('serviceWorker' in navigator) navigator.serviceWorker.register('service-worker.js');
|
||||||
if (params["source"] && params["source"] === "android") {
|
|
||||||
sendLessExplicit = true;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user