From 49de3385c08826030bc04e15d598bfa6562b453f Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 23 May 2011 12:44:47 +0200 Subject: [PATCH] Fix correct image count if there is no replies. --- 4chan_x.js | 3 ++- script.coffee | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 0beb352e0..79a872148 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1971,13 +1971,14 @@ threadStats = { init: function() { var html; - html = "
Replies: 0 Images: 1
"; + html = "
Replies: 0 Images:
"; $.append(d.body, ui.dialog('stats', { bottom: '0px', left: '0px' }, html)); threadStats.replies = 0; threadStats.images = $('.op img[md5]') ? 1 : 0; + $('#icount').textContent = threadStats.images; return g.callbacks.push(threadStats.node); }, node: function(root) { diff --git a/script.coffee b/script.coffee index 54f05a565..b7bb4eaac 100644 --- a/script.coffee +++ b/script.coffee @@ -1547,10 +1547,11 @@ reportButton = threadStats = init: -> - html = "
Replies: 0 Images: 1
" + html = "
Replies: 0 Images:
" $.append d.body, (ui.dialog 'stats', bottom: '0px', left: '0px', html) threadStats.replies = 0 threadStats.images = if $ '.op img[md5]' then 1 else 0 + $('#icount').textContent = threadStats.images g.callbacks.push threadStats.node node: (root) -> return if root.className