Add uri_root_path option. References #104.

This commit is contained in:
Florian Mounier
2016-06-13 16:15:57 +02:00
parent 7ebb122221
commit 503de38429
7 changed files with 26 additions and 10 deletions

View File

@@ -36,7 +36,11 @@ document.addEventListener 'DOMContentLoaded', ->
else
wsUrl = 'ws://'
wsUrl += document.location.host + '/ws' + location.pathname
root_path = document.body.getAttribute('data-root-path')
if root_path.length
root_path = "/#{root_path}"
wsUrl += document.location.host + root_path + '/ws' + location.pathname
ws = new WebSocket wsUrl
ws.addEventListener 'open', ->