Reply back to messages

This commit is contained in:
redfast00 2019-10-08 04:10:15 +02:00
parent a969da0f0f
commit bace4bde22
No known key found for this signature in database
GPG key ID: 5946E0E34FD0553C

View file

@ -4,6 +4,13 @@ title: Cammie
---
<% content_for :scripts do %>
<script src="https://code.jquery.com/jquery-3.0.0.min.js" charset="utf-8"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js" integrity="sha256-yr4fRk/GU1ehYJPAs8P4JlTgu0Hdsp4ZKrx8bDEDC3I=" crossorigin="anonymous"></script>
<script type="text/javascript" charset="utf-8">
var socket = io("https://kelder.zeus.ugent.be");
socket.on('replymessage', function(obj) {
alert("Kelder says: " + obj['message']);
})
</script>
<%= asset :js, :cammie %>
<%= asset :js, :message %>
<% end %>