From 2c2aa309c74e6f09aa411bc553452d70743398a5 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 24 Jul 2011 17:42:27 +0200 Subject: [PATCH] Fix backlink inlining removing its container. --- 4chan_x.user.js | 3 +++ changelog | 1 + script.coffee | 1 + 3 files changed, 5 insertions(+) diff --git a/4chan_x.user.js b/4chan_x.user.js index 465d9ea81..3264bb062 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2048,6 +2048,9 @@ if (el = d.getElementById(id)) { inline = quoteInline.table(id, el.innerHTML); if (this.className === 'backlink') { + if ($("a.backlink[href='#" + id + "']", el)) { + return; + } $.after(this.parentNode, inline); $.hide($.x('ancestor::table[1]', el)); } else { diff --git a/changelog b/changelog index dbf5a76e2..f81eebade 100644 --- a/changelog +++ b/changelog @@ -4,6 +4,7 @@ github - fix remember updater's interval settings - fix wrong keybind input in options - fix time preview + - fix backlink inlining removing its container 2.16.1 - mayhem: diff --git a/script.coffee b/script.coffee index 17dca7bb8..914bd8dd3 100644 --- a/script.coffee +++ b/script.coffee @@ -1592,6 +1592,7 @@ quoteInline = if el = d.getElementById id inline = quoteInline.table id, el.innerHTML if @className is 'backlink' + return if $("a.backlink[href='##{id}']", el) $.after @parentNode, inline $.hide $.x 'ancestor::table[1]', el else