This commit is contained in:
parent
55cb005cbf
commit
799e76bdc7
@ -1,9 +1,9 @@
|
|||||||
function openWebSocket() {
|
function openWebSocket() {
|
||||||
window.ws = new WebSocket("/custom/ws");
|
window.ws = new WebSocket("/custom/ws");
|
||||||
window.ws.onmessage = (e) => {
|
window.ws.onmessage = e => {
|
||||||
const msg = JSON.parse(e.data);
|
const msg = JSON.parse(e.data);
|
||||||
if ("ports" in msg) {
|
if ("ports" in msg) {
|
||||||
location.port = (location.protocol == "https:" ? msg.ports.https : msg.ports.http);
|
location.port = location.protocol == "https:" ? msg.ports.https : msg.ports.http;
|
||||||
}
|
}
|
||||||
if ("config_reloaded" in msg) {
|
if ("config_reloaded" in msg) {
|
||||||
//window.is_admin = undefined;
|
//window.is_admin = undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user