forked from MarseyWorld/MarseyWorld
add reddit embeds to chat
parent
3b5d9ee12f
commit
e89c85aa41
|
@ -123,6 +123,8 @@ socket.on('speak', function(json) {
|
|||
}
|
||||
}
|
||||
|
||||
scrolled_down()
|
||||
|
||||
let line = document.getElementsByClassName('chat-line')[0].cloneNode(true)
|
||||
register_new_elements(line);
|
||||
bs_trigger(line)
|
||||
|
@ -144,6 +146,8 @@ socket.on('speak', function(json) {
|
|||
|
||||
if (scrolled_down() && document.getElementsByClassName('chat-message').length > 250)
|
||||
document.getElementById('chat-window').firstElementChild.remove()
|
||||
|
||||
embed_reddit()
|
||||
})
|
||||
|
||||
function send() {
|
||||
|
|
|
@ -123,4 +123,5 @@
|
|||
{% else %}
|
||||
<script defer src="{{'js/vendor/twitter.js' | asset}}"></script>
|
||||
{% endif %}
|
||||
<script defer src="{{'js/vendor/reddit.js' | asset}}"></script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -134,4 +134,5 @@
|
|||
{% else %}
|
||||
<script defer src="{{'js/vendor/twitter.js' | asset}}"></script>
|
||||
{% endif %}
|
||||
<script defer src="{{'js/vendor/reddit.js' | asset}}"></script>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue