mirror of https://github.com/anoshenko/rui.git
Refactoring of js code
This commit is contained in:
parent
d7f0dd4358
commit
5354ec6ea1
412
app_scripts.js
412
app_scripts.js
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
var socket
|
let socket
|
||||||
var socketUrl
|
let socketUrl
|
||||||
|
|
||||||
function sendMessage(message) {
|
function sendMessage(message) {
|
||||||
if (socket) {
|
if (socket) {
|
||||||
|
@ -10,7 +10,7 @@ function sendMessage(message) {
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
socketUrl = document.location.protocol == "https:" ? "wss://" : "ws://"
|
socketUrl = document.location.protocol == "https:" ? "wss://" : "ws://"
|
||||||
socketUrl += document.location.hostname
|
socketUrl += document.location.hostname
|
||||||
var port = document.location.port
|
const port = document.location.port
|
||||||
if (port) {
|
if (port) {
|
||||||
socketUrl += ":" + port
|
socketUrl += ":" + port
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue