1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-11-25 22:37:18 +00:00

Merge pull request #134 from Kernald/fix-double-slashes

Fix double slashes in websocket URL
This commit is contained in:
Andy 2018-01-22 04:33:54 +01:00 committed by GitHub
commit a99b0a5ddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -545,6 +545,7 @@ function get_appropriate_ws_url()
{
var pcol;
var u = document.URL;
var separator;
/*
/* We open the websocket encrypted if this page came on an
@ -562,7 +563,13 @@ function get_appropriate_ws_url()
u = u.split('#');
return pcol + u[0] + "/ws";
if (/\/$/.test(u[0])) {
separator = "";
} else {
separator = "/";
}
return pcol + u[0] + separator + "ws";
}
var updateVolumeIcon = function(volume)