mirror of
https://github.com/paradoxxxzero/butterfly.git
synced 2026-05-26 07:08:08 +00:00
Fix coffee as per #179
This commit is contained in:
@@ -34,11 +34,12 @@ document.addEventListener 'DOMContentLoaded', ->
|
|||||||
wsUrl = 'ws://'
|
wsUrl = 'ws://'
|
||||||
|
|
||||||
rootPath = document.body.getAttribute('data-root-path')
|
rootPath = document.body.getAttribute('data-root-path')
|
||||||
|
rootPath = rootPath.replace(/^\/+|\/+$/g, '')
|
||||||
if rootPath.length
|
if rootPath.length
|
||||||
rootPath = "/#{rootPath}"
|
rootPath = "/#{rootPath}"
|
||||||
|
|
||||||
wsUrl += document.location.host + rootPath
|
wsUrl += document.location.host + rootPath
|
||||||
path = location.pathname
|
path = '/'
|
||||||
if path.indexOf('/session') < 0
|
if path.indexOf('/session') < 0
|
||||||
path += "session/#{document.body.getAttribute('data-session-token')}"
|
path += "session/#{document.body.getAttribute('data-session-token')}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user