momic templating from sw in ws
This commit is contained in:
parent
c941c86c13
commit
cbdd432954
|
|
@ -47,11 +47,10 @@ const xtermDataSource: XtermDataSource = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const searchParams = new URLSearchParams(window.location.search);
|
const searchParams = new URLSearchParams(window.location.search);
|
||||||
const guid = searchParams.get('ws');
|
let testServerBaseUrl = new URL('../', window.location.href);
|
||||||
let testServerBaseUrl = new URL(window.location.href);
|
|
||||||
if (testServerBaseUrl.searchParams.has('server'))
|
if (testServerBaseUrl.searchParams.has('server'))
|
||||||
testServerBaseUrl = new URL(testServerBaseUrl.searchParams.get('server')!, testServerBaseUrl);
|
testServerBaseUrl = new URL(testServerBaseUrl.searchParams.get('server')!, testServerBaseUrl);
|
||||||
const wsURL = new URL(`../${guid}`, testServerBaseUrl);
|
const wsURL = new URL(searchParams.get('ws')!, testServerBaseUrl);
|
||||||
wsURL.protocol = (wsURL.protocol === 'https:' ? 'wss:' : 'ws:');
|
wsURL.protocol = (wsURL.protocol === 'https:' ? 'wss:' : 'ws:');
|
||||||
const queryParams = {
|
const queryParams = {
|
||||||
args: searchParams.getAll('arg'),
|
args: searchParams.getAll('arg'),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue