diff --git a/builds/4chan-X.js b/builds/4chan-X.js index 6cfcb0d1f..37613c19c 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -3796,14 +3796,17 @@ } }, add: function(quotelink, boardID, threadID, postID, context) { - var inline, isBacklink, post; + var inline, isBacklink, post, qroot, root; isBacklink = $.hasClass(quotelink, 'backlink'); inline = $.el('div', { id: "i" + postID, className: 'inline' }); - $.after(QuoteInline.findRoot(quotelink, isBacklink), inline); + root = QuoteInline.findRoot(quotelink, isBacklink); + $.after(root, inline); + qroot = $.x('ancestor::*[contains(@class,"postContainer")][1]', root); + $.addClass(qroot, 'hasInline'); Get.postClone(boardID, threadID, postID, inline, context); if (!((post = g.posts["" + boardID + "." + postID]) && context.thread === post.thread)) { return; diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 33dd09687..9ad124789 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -3792,14 +3792,17 @@ } }, add: function(quotelink, boardID, threadID, postID, context) { - var inline, isBacklink, post; + var inline, isBacklink, post, qroot, root; isBacklink = $.hasClass(quotelink, 'backlink'); inline = $.el('div', { id: "i" + postID, className: 'inline' }); - $.after(QuoteInline.findRoot(quotelink, isBacklink), inline); + root = QuoteInline.findRoot(quotelink, isBacklink); + $.after(root, inline); + qroot = $.x('ancestor::*[contains(@class,"postContainer")][1]', root); + $.addClass(qroot, 'hasInline'); Get.postClone(boardID, threadID, postID, inline, context); if (!((post = g.posts["" + boardID + "." + postID]) && context.thread === post.thread)) { return; diff --git a/builds/crx/script.js b/builds/crx/script.js index d83e65bdb..d10370c99 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -3794,14 +3794,17 @@ } }, add: function(quotelink, boardID, threadID, postID, context) { - var inline, isBacklink, post; + var inline, isBacklink, post, qroot, root; isBacklink = $.hasClass(quotelink, 'backlink'); inline = $.el('div', { id: "i" + postID, className: 'inline' }); - $.after(QuoteInline.findRoot(quotelink, isBacklink), inline); + root = QuoteInline.findRoot(quotelink, isBacklink); + $.after(root, inline); + qroot = $.x('ancestor::*[contains(@class,"postContainer")][1]', root); + $.addClass(qroot, 'hasInline'); Get.postClone(boardID, threadID, postID, inline, context); if (!((post = g.posts["" + boardID + "." + postID]) && context.thread === post.thread)) { return; diff --git a/src/Quotelinks/QuoteInline.coffee b/src/Quotelinks/QuoteInline.coffee index adcba610e..cb63f4780 100644 --- a/src/Quotelinks/QuoteInline.coffee +++ b/src/Quotelinks/QuoteInline.coffee @@ -54,7 +54,12 @@ QuoteInline = inline = $.el 'div', id: "i#{postID}" className: 'inline' - $.after QuoteInline.findRoot(quotelink, isBacklink), inline + root = QuoteInline.findRoot(quotelink, isBacklink) + $.after root, inline + + qroot = $.x 'ancestor::*[contains(@class,"postContainer")][1]', root + + $.addClass qroot, 'hasInline' Get.postClone boardID, threadID, postID, inline, context return unless (post = g.posts["#{boardID}.#{postID}"]) and