diff --git a/4chan_x.user.js b/4chan_x.user.js index 3c41dc3f8..60a1b799a 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2055,7 +2055,7 @@ } return; } - root = this.parentNode.nodeName === 'FONT' ? this.parentNode : this.nextSibling; + root = this.parentNode.nodeName === 'FONT' ? this.parentNode : this.nextSibling ? this.nextSibling : this; if (el = d.getElementById(id)) { inline = quoteInline.table(id, el.innerHTML); if (this.className === 'backlink') { diff --git a/changelog b/changelog index 41a607aee..b8bb902de 100644 --- a/changelog +++ b/changelog @@ -2,6 +2,7 @@ github - mayhem: - Thread Stats performance fix, especially on long threads - Sauce performance improvement + - fix Quote Inlining for a pattern - aeosynth: - fix an upgrading problem (1.x -> 2.x) diff --git a/script.coffee b/script.coffee index 5fe557425..bcf31bee7 100644 --- a/script.coffee +++ b/script.coffee @@ -1606,7 +1606,7 @@ quoteInline = for inlined in $$ 'input', table $.show $.x 'ancestor::table[1]', d.getElementById inlined.name return - root = if @parentNode.nodeName is 'FONT' then @parentNode else @nextSibling + root = if @parentNode.nodeName is 'FONT' then @parentNode else if @nextSibling then @nextSibling else @ if el = d.getElementById id inline = quoteInline.table id, el.innerHTML if @className is 'backlink'