Fix ws url

This commit is contained in:
Ruben van de Ven 2018-11-04 10:22:10 +01:00
parent b9f2e0050b
commit 5678e90ae6
2 changed files with 4 additions and 2 deletions

View file

@ -83,7 +83,8 @@
<script src="https://cdn.plot.ly/plotly-1.5.0.min.js"></script> <script src="https://cdn.plot.ly/plotly-1.5.0.min.js"></script>
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
var wsUri = window.location.toString().replace('http','ws') + "ws"; var url = window.location.toString().replace('http','ws');
var wsUri = url.substring(0, url.lastIndexOf("/")) + "/ws";
console.log(wsUri) console.log(wsUri)
</script> </script>

View file

@ -83,7 +83,8 @@
<script src="https://cdn.plot.ly/plotly-1.5.0.min.js"></script> <script src="https://cdn.plot.ly/plotly-1.5.0.min.js"></script>
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
var wsUri = window.location.toString().replace('http','ws') + "ws"; var url = window.location.toString().replace('http','ws');
var wsUri = url.substring(0, url.lastIndexOf("/")) + "/ws";
console.log(wsUri) console.log(wsUri)
</script> </script>