Fix correct image count if there is no replies.
This commit is contained in:
parent
cec02d0f92
commit
49de3385c0
@ -1971,13 +1971,14 @@
|
|||||||
threadStats = {
|
threadStats = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var html;
|
var html;
|
||||||
html = "<div class=move>Replies: <span id=rcount>0</span> Images: <span id=icount>1</span></div>";
|
html = "<div class=move>Replies: <span id=rcount>0</span> Images: <span id=icount></span></div>";
|
||||||
$.append(d.body, ui.dialog('stats', {
|
$.append(d.body, ui.dialog('stats', {
|
||||||
bottom: '0px',
|
bottom: '0px',
|
||||||
left: '0px'
|
left: '0px'
|
||||||
}, html));
|
}, html));
|
||||||
threadStats.replies = 0;
|
threadStats.replies = 0;
|
||||||
threadStats.images = $('.op img[md5]') ? 1 : 0;
|
threadStats.images = $('.op img[md5]') ? 1 : 0;
|
||||||
|
$('#icount').textContent = threadStats.images;
|
||||||
return g.callbacks.push(threadStats.node);
|
return g.callbacks.push(threadStats.node);
|
||||||
},
|
},
|
||||||
node: function(root) {
|
node: function(root) {
|
||||||
|
|||||||
@ -1547,10 +1547,11 @@ reportButton =
|
|||||||
|
|
||||||
threadStats =
|
threadStats =
|
||||||
init: ->
|
init: ->
|
||||||
html = "<div class=move>Replies: <span id=rcount>0</span> Images: <span id=icount>1</span></div>"
|
html = "<div class=move>Replies: <span id=rcount>0</span> Images: <span id=icount></span></div>"
|
||||||
$.append d.body, (ui.dialog 'stats', bottom: '0px', left: '0px', html)
|
$.append d.body, (ui.dialog 'stats', bottom: '0px', left: '0px', html)
|
||||||
threadStats.replies = 0
|
threadStats.replies = 0
|
||||||
threadStats.images = if $ '.op img[md5]' then 1 else 0
|
threadStats.images = if $ '.op img[md5]' then 1 else 0
|
||||||
|
$('#icount').textContent = threadStats.images
|
||||||
g.callbacks.push threadStats.node
|
g.callbacks.push threadStats.node
|
||||||
node: (root) ->
|
node: (root) ->
|
||||||
return if root.className
|
return if root.className
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user