forked from mbk-lab/rui_orig
2
0
Fork 0

Refactoring of js code

This commit is contained in:
Alexei Anoshenko 2024-01-15 08:13:46 -05:00
parent d7f0dd4358
commit 5354ec6ea1
2 changed files with 205 additions and 221 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
var socket
var socketUrl
let socket
let socketUrl
function sendMessage(message) {
if (socket) {
@ -10,7 +10,7 @@ function sendMessage(message) {
window.onload = function() {
socketUrl = document.location.protocol == "https:" ? "wss://" : "ws://"
socketUrl += document.location.hostname
var port = document.location.port
const port = document.location.port
if (port) {
socketUrl += ":" + port
}