From d155eed8d77294bece1823cd08a6cdc5a8ea7106 Mon Sep 17 00:00:00 2001 From: noface Date: Sat, 15 Dec 2012 11:08:14 +0100 Subject: [PATCH] Fix deadquotes showing up in code-tags. --- 4chan_x.user.js | 4 ++++ changelog | 1 + script.coffee | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/4chan_x.user.js b/4chan_x.user.js index 8c622a4c0..14c34fd06 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -4316,6 +4316,10 @@ _ref = $$('.quote.deadlink', post.blockquote); for (_i = 0, _len = _ref.length; _i < _len; _i++) { deadlink = _ref[_i]; + if (deadlink.parentElement.className === 'prettyprint') { + $.replace(deadlink, deadlink.firstChild); + continue; + } quote = deadlink.textContent; a = $.el('a', { textContent: "" + quote + "\u00A0(Dead)" diff --git a/changelog b/changelog index 3139d6d31..3ffc20c2c 100644 --- a/changelog +++ b/changelog @@ -1,6 +1,7 @@ master - noface Fix Anonymize not working on stubs. + Fix deadquotes showing up in code-tags. - Mayhem Fix selection quoting on Opera. Fix history bug with Persistent QR enabled on Chrome. diff --git a/script.coffee b/script.coffee index 4f6e93a89..dea587a50 100644 --- a/script.coffee +++ b/script.coffee @@ -3526,6 +3526,11 @@ Quotify = node: (post) -> return if post.isInlined and not post.isCrosspost for deadlink in $$ '.quote.deadlink', post.blockquote + + if deadlink.parentElement.className is 'prettyprint' + $.replace deadlink, deadlink.firstChild + continue + quote = deadlink.textContent a = $.el 'a', # \u00A0 is nbsp