aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/messages_widget.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl/messages_widget.tpl')
-rw-r--r--view/tpl/messages_widget.tpl11
1 files changed, 7 insertions, 4 deletions
diff --git a/view/tpl/messages_widget.tpl b/view/tpl/messages_widget.tpl
index d3dbd7be9..6f888962d 100644
--- a/view/tpl/messages_widget.tpl
+++ b/view/tpl/messages_widget.tpl
@@ -59,9 +59,14 @@
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('hq');
+ get_messages_page();
}
});
@@ -75,10 +80,8 @@
get_messages_page();
});
- $('.messages-timeago').timeago();
- $('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active');
-
function get_messages_page() {
+
if (get_messages_page_active)
return;