diff --git a/4chan_x.js b/4chan_x.js index 2673f5e5a..adfe98434 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1604,6 +1604,9 @@ cb: { node: function(root) { var i, link, names, prefix, prefixes, s, span, suffix, _len, _results; + if (root.className === 'inline') { + return; + } prefixes = (function() { var _i, _len, _ref, _results; _ref = $.config('flavors').split('\n'); @@ -1880,14 +1883,16 @@ cb: { node: function(root) { var a, span; - span = $('span[id^=no]', root); - a = $.el('a', { - className: 'reportbutton', - innerHTML: '[ ! ]' - }); - $.bind(a, 'click', reportButton.cb.report); - $.after(span, a); - return $.after(span, $.tn(' ')); + if (!(a = $('a.reportbutton', root))) { + span = $('span[id^=no]', root); + a = $.el('a', { + className: 'reportbutton', + innerHTML: '[ ! ]' + }); + $.after(span, a); + $.after(span, $.tn(' ')); + } + return $.bind(a, 'click', reportButton.cb.report); }, report: function(e) { return reportButton.report(this); @@ -1910,6 +1915,9 @@ }, cb: { node: function(root) { + if (root.className === 'inline') { + return; + } unread.replies.push(root); unread.updateTitle(); return Favicon.update(); diff --git a/script.coffee b/script.coffee index 18cc4fcef..7b92c6dd2 100644 --- a/script.coffee +++ b/script.coffee @@ -1305,6 +1305,7 @@ sauce = g.callbacks.push sauce.cb.node cb: node: (root) -> + return if root.className is 'inline' prefixes = (s for s in ($.config('flavors').split '\n') when s[0] != '#') names = (prefix.match(/(\w+)\./)[1] for prefix in prefixes) if span = $ 'span.filesize', root @@ -1484,13 +1485,14 @@ reportButton = g.callbacks.push reportButton.cb.node cb: node: (root) -> - span = $ 'span[id^=no]', root - a = $.el 'a', - className: 'reportbutton' - innerHTML: '[ ! ]' + if not a = $ 'a.reportbutton', root + span = $ 'span[id^=no]', root + a = $.el 'a', + className: 'reportbutton' + innerHTML: '[ ! ]' + $.after span, a + $.after span, $.tn(' ') $.bind a, 'click', reportButton.cb.report - $.after span, a - $.after span, $.tn(' ') report: (e) -> reportButton.report this report: (target) -> @@ -1508,6 +1510,7 @@ unread = cb: node: (root) -> + return if root.className is 'inline' unread.replies.push root unread.updateTitle() Favicon.update()