diff --git a/4chan_x.js b/4chan_x.js index 3a9f556c9..fc4efb639 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1766,7 +1766,6 @@ } else { $.after(this.parentNode, inline); } - return $.addClass(this, 'inlined'); } else { inline = $.el('td', { className: 'reply inline', @@ -1777,14 +1776,15 @@ threadID = this.pathname.split('/').pop() || $.x('ancestor::div[@class="thread"]/div', this).id; if (req = g.requests[threadID]) { if (req.readyState === 4) { - return quoteInline.parse(req, id, threadID, inline); + quoteInline.parse(req, id, threadID, inline); } } else { - return g.requests[threadID] = $.get(this.href, (function() { + g.requests[threadID] = $.get(this.href, (function() { return quoteInline.parse(this, id, threadID, inline); })); } } + return $.addClass(this, 'inlined'); }, parse: function(req, id, threadID, inline) { var body, html, newInline, op, reply, _i, _len, _ref; diff --git a/script.coffee b/script.coffee index 171a84e90..18ccd14e3 100644 --- a/script.coffee +++ b/script.coffee @@ -1413,7 +1413,6 @@ quoteInline = $.hide $.x 'ancestor::table[1]', el else $.after @parentNode, inline - $.addClass @, 'inlined' else inline = $.el 'td', className: 'reply inline' @@ -1428,6 +1427,7 @@ quoteInline = else #FIXME need an array of callbacks g.requests[threadID] = $.get @href, (-> quoteInline.parse @, id, threadID, inline) + $.addClass @, 'inlined' parse: (req, id, threadID, inline) -> if req.status isnt 200 inline.innerHTML = "#{req.status} #{req.statusText}"