diff --git a/4chan_x.user.js b/4chan_x.user.js index 971aad936..08c0b61d7 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2275,6 +2275,8 @@ left: '0px' }, html); dialog.className = 'dialog'; + threadStats.postcountID = $('#postcount', dialog); + threadStats.imagecountID = $('#imagecount', dialog); $.append(d.body, dialog); return g.callbacks.push(threadStats.node); }, @@ -2282,15 +2284,13 @@ if (root.className) { return; } - threadStats.posts++; + threadStats.postcountID.textContent = ++threadStats.posts; if ($('img[md5]', root)) { - threadStats.images++; + threadStats.imagecountID.textContent = ++threadStats.images; if (threadStats.images > 150) { - $('#imagecount').className = 'error'; + return threadStats.imagecountID.className = 'error'; } } - $('#postcount').textContent = threadStats.posts; - return $('#imagecount').textContent = threadStats.images; } }; unread = { diff --git a/changelog b/changelog index 1f0654418..a0a82341c 100644 --- a/changelog +++ b/changelog @@ -1,5 +1,6 @@ - mayhem: - Fix Auto Watch Reply and prevent upload of too large files when auto posting + - Thread Stats performance fix, especially on long threads 2.15.1 - mayhem: diff --git a/script.coffee b/script.coffee index 9517ac01f..6ab1d836b 100644 --- a/script.coffee +++ b/script.coffee @@ -1746,17 +1746,17 @@ threadStats = html = "