mirror of
https://github.com/SuperBFG7/ympd
synced 2024-11-23 05:17:18 +00:00
Merge branch 'fix-double-slashes' of git://github.com/Kernald/ympd into fix-double-slashes
This commit is contained in:
commit
66ff05e8b5
@ -621,6 +621,7 @@ function get_appropriate_ws_url()
|
|||||||
{
|
{
|
||||||
var pcol;
|
var pcol;
|
||||||
var u = document.URL;
|
var u = document.URL;
|
||||||
|
var separator;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
/* We open the websocket encrypted if this page came on an
|
/* We open the websocket encrypted if this page came on an
|
||||||
@ -638,7 +639,13 @@ function get_appropriate_ws_url()
|
|||||||
|
|
||||||
u = u.split('#');
|
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)
|
var updateVolumeIcon = function(volume)
|
||||||
|
Loading…
Reference in New Issue
Block a user