summaryrefslogtreecommitdiff
path: root/static/js
diff options
context:
space:
mode:
Diffstat (limited to 'static/js')
-rw-r--r--static/js/lafargue.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/static/js/lafargue.js b/static/js/lafargue.js
new file mode 100644
index 0000000..06e967d
--- /dev/null
+++ b/static/js/lafargue.js
@@ -0,0 +1,8 @@
+jQuery(function($) {
+ if (WebSocket) {
+ var socket = new WebSocket('ws://localhost:3001/lafargue/events');
+ socket.onmessage = function(event) {
+ $('.lafargue-list').prepend(event.data);
+ };
+ }
+});