diff options
author | Mario <mario@mariovavti.com> | 2021-06-20 08:25:29 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-06-20 08:25:29 +0000 |
commit | 5b9dc764c5e6fbc8b0570265f6f5f84c9160ee6e (patch) | |
tree | c100dcbb4f4e36b5685adee9cadc6629bce57430 | |
parent | cf69859885d5af1bd34448635c0970cd50f7691f (diff) | |
download | volse-hubzilla-5b9dc764c5e6fbc8b0570265f6f5f84c9160ee6e.tar.gz volse-hubzilla-5b9dc764c5e6fbc8b0570265f6f5f84c9160ee6e.tar.bz2 volse-hubzilla-5b9dc764c5e6fbc8b0570265f6f5f84c9160ee6e.zip |
make sure to not calculate timeago before the translations are loaded
-rw-r--r-- | view/tpl/messages_widget.tpl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/view/tpl/messages_widget.tpl b/view/tpl/messages_widget.tpl index 6670faa60..6f888962d 100644 --- a/view/tpl/messages_widget.tpl +++ b/view/tpl/messages_widget.tpl @@ -59,6 +59,11 @@ var get_messages_page_active = false; var messages_type; + $(document).ready(function () { + $('.messages-timeago').timeago(); + $('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active'); + }); + $('#messages-widget').on('scroll', function() { if(this.scrollTop > this.scrollHeight - this.clientHeight - (this.scrollHeight/7)) { get_messages_page(); @@ -75,9 +80,6 @@ get_messages_page(); }); - $('.messages-timeago').timeago(); - $('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active'); - function get_messages_page() { if (get_messages_page_active) |