From 3570e1f70be716e63c7220b988d2f5bc837c3b51 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 23 May 2011 16:16:06 +0200 Subject: [PATCH] Simple. --- 4chan_x.js | 7 +++---- script.coffee | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 79a872148..9294ed71b 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1971,14 +1971,13 @@ threadStats = { init: function() { var html; - html = "
Replies: 0 Images:
"; + threadStats.replies = 0; + threadStats.images = $('.op img[md5]') ? 1 : 0; + html = "
Replies: " + threadStats.replies + " Images: " + threadStats.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 b7bb4eaac..6a39a79c7 100644 --- a/script.coffee +++ b/script.coffee @@ -1547,11 +1547,10 @@ reportButton = threadStats = init: -> - 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 + html = "
Replies: #{threadStats.replies} Images: #{threadStats.images}
" + $.append d.body, (ui.dialog 'stats', bottom: '0px', left: '0px', html) g.callbacks.push threadStats.node node: (root) -> return if root.className