From c64b7014c4862b7c3bc8930956286cf1112d8964 Mon Sep 17 00:00:00 2001 From: James Campos Date: Mon, 23 May 2011 16:27:01 -0700 Subject: [PATCH] stats: s/replies/posts if you count the op image, you might as well count the op. also (the real reason): 'posts' has less characters than 'replies'. --- 4chan_x.js | 8 ++++---- script.coffee | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 09176eaef..1d3ace278 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1971,9 +1971,9 @@ threadStats = { init: function() { var dialog, html; - threadStats.replies = 0; + threadStats.posts = 1; threadStats.images = $('.op img[md5]') ? 1 : 0; - html = "
Replies: " + threadStats.replies + " Images: " + threadStats.images + "
"; + html = "
Posts: " + threadStats.posts + " Images: " + threadStats.images + "
"; dialog = ui.dialog('stats', { bottom: '0px', left: '0px' @@ -1986,14 +1986,14 @@ if (root.className) { return; } - threadStats.replies++; + threadStats.posts++; if ($('img[md5]', root)) { threadStats.images++; if (threadStats.images > 150) { $('#icount').className = 'error'; } } - $('#rcount').textContent = threadStats.replies; + $('#rcount').textContent = threadStats.posts; return $('#icount').textContent = threadStats.images; } }; diff --git a/script.coffee b/script.coffee index 50a5ff30b..c1c936cd5 100644 --- a/script.coffee +++ b/script.coffee @@ -1547,21 +1547,21 @@ reportButton = threadStats = init: -> - threadStats.replies = 0 + threadStats.posts = 1 threadStats.images = if $ '.op img[md5]' then 1 else 0 - html = "
Replies: #{threadStats.replies} Images: #{threadStats.images}
" + html = "
Posts: #{threadStats.posts} Images: #{threadStats.images}
" dialog = ui.dialog 'stats', bottom: '0px', left: '0px', html dialog.className = 'dialog' $.append d.body, dialog g.callbacks.push threadStats.node node: (root) -> return if root.className - threadStats.replies++ + threadStats.posts++ if $ 'img[md5]', root threadStats.images++ if threadStats.images > 150 $('#icount').className = 'error' - $('#rcount').textContent = threadStats.replies + $('#rcount').textContent = threadStats.posts $('#icount').textContent = threadStats.images unread =