more refactor
This commit is contained in:
parent
3c74ac841c
commit
3b82e39d03
|
|
@ -48,10 +48,9 @@ const xtermDataSource: XtermDataSource = {
|
||||||
|
|
||||||
const searchParams = new URLSearchParams(window.location.search);
|
const searchParams = new URLSearchParams(window.location.search);
|
||||||
const guid = searchParams.get('ws');
|
const guid = searchParams.get('ws');
|
||||||
const testServerPort = searchParams.get('testServerPort') ?? window.location.port;
|
|
||||||
const wsURL = new URL(`../${guid}`, window.location.toString());
|
const wsURL = new URL(`../${guid}`, window.location.toString());
|
||||||
wsURL.protocol = (window.location.protocol === 'https:' ? 'wss:' : 'ws:');
|
wsURL.protocol = (window.location.protocol === 'https:' ? 'wss:' : 'ws:');
|
||||||
wsURL.port = testServerPort;
|
wsURL.port = searchParams.get('testServerPort') ?? window.location.port;
|
||||||
const queryParams = {
|
const queryParams = {
|
||||||
args: searchParams.getAll('arg'),
|
args: searchParams.getAll('arg'),
|
||||||
grep: searchParams.get('grep') || undefined,
|
grep: searchParams.get('grep') || undefined,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue