diff --git a/4chan_x.coffee b/4chan_x.coffee index 67e0ea415..ba2389e3b 100644 --- a/4chan_x.coffee +++ b/4chan_x.coffee @@ -837,7 +837,7 @@ updateCallback = -> if g.verbose l = arr.length count.textContent = "+#{l}" - if l > 0 then count.className = 'new' + count.className = if l > 0 then 'new' else '' #insert replies in order, so backlinks resolve while reply = arr.pop() diff --git a/4chan_x.js b/4chan_x.js index 6bbbcefa0..169a4ea48 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1156,9 +1156,7 @@ if (g.verbose) { l = arr.length; count.textContent = "+" + l; - if (l > 0) { - count.className = 'new'; - } + count.className = l > 0 ? 'new' : ''; } while (reply = arr.pop()) { table = x('ancestor::table', reply);