From 652db9790d39a5cb13f2b381d3c919ffc51256e7 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 31 Aug 2011 01:19:17 +0200 Subject: [PATCH] Fix backlinks added into inlined quotes. --- 4chan_x.user.js | 2 +- changelog | 5 +++-- script.coffee | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 31aef9d43..2c208faca 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2154,7 +2154,7 @@ if (conf['Quote Inline']) { $.bind(link, 'click', quoteInline.toggle); } - if (!(container = $('.container', el))) { + if (!((container = $('.container', el)) && container.parentNode === el)) { container = $.el('span', { className: 'container' }); diff --git a/changelog b/changelog index b9db51afd..65315f6f1 100644 --- a/changelog +++ b/changelog @@ -1,8 +1,9 @@ master - mayhem - fix updater refreshing 404'd threads - distinguishable unread favicons on white backgrounds backlink formatting + distinguishable unread favicons on white backgrounds + fix updater refreshing 404'd threads + fix backlinks added into inlined quotes 2.18.3 - mayhem diff --git a/script.coffee b/script.coffee index db8ec4f3b..0825fa311 100644 --- a/script.coffee +++ b/script.coffee @@ -1705,7 +1705,7 @@ quoteBacklink = $.bind link, 'mouseout', quotePreview.mouseout if conf['Quote Inline'] $.bind link, 'click', quoteInline.toggle - unless container = $ '.container', el + unless (container = $ '.container', el) and container.parentNode is el container = $.el 'span', className: 'container' root = $('.reportbutton', el) or $('span[id^=no]', el) $.after root, container