forked from mbk-lab/rui_orig
Refactoring of js code
This commit is contained in:
parent
d7f0dd4358
commit
5354ec6ea1
420
app_scripts.js
420
app_scripts.js
File diff suppressed because it is too large
Load Diff
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue