mirror of
https://github.com/moparisthebest/mailcatcher
synced 2024-12-22 07:18:53 -05:00
parent
e76d367755
commit
d3f083f8df
@ -292,8 +292,9 @@ class MailCatcher
|
|||||||
@subscribePoll()
|
@subscribePoll()
|
||||||
|
|
||||||
subscribeWebSocket: ->
|
subscribeWebSocket: ->
|
||||||
secure = window.location.scheme == "https"
|
secure = window.location.protocol is "https:"
|
||||||
@websocket = new WebSocket("#{if secure then "wss" else "ws"}://#{window.location.host}/messages")
|
protocol = if secure then "wss" else "ws"
|
||||||
|
@websocket = new WebSocket("#{protocol}://#{window.location.host}/messages")
|
||||||
@websocket.onmessage = (event) =>
|
@websocket.onmessage = (event) =>
|
||||||
@addMessage $.parseJSON event.data
|
@addMessage $.parseJSON event.data
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user