diff options
Diffstat (limited to 'public')
| -rw-r--r-- | public/assets/js/lib/views/stream/hootstream.js | 1 | ||||
| -rw-r--r-- | public/assets/js/util/format.js | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/public/assets/js/lib/views/stream/hootstream.js b/public/assets/js/lib/views/stream/hootstream.js index 2de184a..e4bee0b 100644 --- a/public/assets/js/lib/views/stream/hootstream.js +++ b/public/assets/js/lib/views/stream/hootstream.js @@ -130,6 +130,7 @@ var HootStream = View.extend({ return ["<div>Missing thread!</div>"]; } thread = thread.shift(); + console.log(query, thread.id); const isViewingThread = query.thread === thread.id; // console.log(thread, comments, files, images); const postedToday = +new Date() / 1000 - thread.lastmodified < 86400; diff --git a/public/assets/js/util/format.js b/public/assets/js/util/format.js index 61ff234..c477a9a 100644 --- a/public/assets/js/util/format.js +++ b/public/assets/js/util/format.js @@ -303,7 +303,7 @@ function get_scale_opacity(value, scale) { } function trimComment(isViewingThread) { return function (comment) { - return isViewingThread || comment.comment.length < 1024 + return isViewingThread || comment.comment.length < 256 ? comment : { ...comment, @@ -312,7 +312,7 @@ function trimComment(isViewingThread) { .split("\n") .slice(0, 5) .join("\n") - .substr(0, 1024) + .substr(0, 512) .replace(/\s+\w+$/, "") + `... <a href="/stream/thread/${comment.thread}" class="readMore">Read more...</a>`, }; |
