summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/js/lafargue.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/static/js/lafargue.js b/static/js/lafargue.js
index 06e967d..33c8e90 100644
--- a/static/js/lafargue.js
+++ b/static/js/lafargue.js
@@ -1,6 +1,7 @@
jQuery(function($) {
if (WebSocket) {
- var socket = new WebSocket('ws://localhost:3001/lafargue/events');
+ var websocket_base = $('head').attr('data-websocket-base');
+ var socket = new WebSocket(websocket_base + '/lafargue/events');
socket.onmessage = function(event) {
$('.lafargue-list').prepend(event.data);
};