From 825b258d995f3c1512af20124d9c72768014ef09 Mon Sep 17 00:00:00 2001 From: mluto Date: Mon, 7 Jan 2013 17:43:03 +0100 Subject: [PATCH] only load 20 messages when pressing the load-link, fixed whitespace --- src/static/js/chat.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/static/js/chat.js b/src/static/js/chat.js index 2136c56c..edd6c500 100644 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -167,9 +167,9 @@ var chat = (function() $("#chatcounter").text(0); $("#chatloadmessages").click(function() { - var start = Math.max(self.historyPointer - 100, 0); - var end = self.historyPointer; - + var start = Math.max(self.historyPointer - 20, 0); + var end = self.historyPointer; + if(start == end) // nothing to load return; if(start == 0) // reached the top