From 432702dd41f7820a8be94be739ce04dc84334881 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 19 May 2011 16:08:30 +0200 Subject: [PATCH] Highlight quoted post during quote preview. close #81 --- 4chan_x.js | 4 ++++ script.coffee | 3 +++ 2 files changed, 7 insertions(+) diff --git a/4chan_x.js b/4chan_x.js index e245129bc..725b0cd79 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1837,6 +1837,10 @@ qp = $('#qp'); if (el = d.getElementById(id)) { qp.innerHTML = el.innerHTML; + if (el.className === 'reply') { + el.className = 'replyhl'; + this.setAttribute('onmouseout', "document.getElementById(" + id + ").className='reply'; this.removeAttribute('onmouseout');"); + } } else { qp.innerHTML = "Loading " + id + "..."; threadID = this.pathname.split('/').pop(); diff --git a/script.coffee b/script.coffee index 9b526ddff..033ce39f6 100644 --- a/script.coffee +++ b/script.coffee @@ -1457,6 +1457,9 @@ quotePreview = qp = $ '#qp' if el = d.getElementById id qp.innerHTML = el.innerHTML + if el.className is 'reply' + el.className = 'replyhl' + @setAttribute 'onmouseout', "document.getElementById(#{id}).className='reply'; this.removeAttribute('onmouseout');" else qp.innerHTML = "Loading #{id}..." threadID = @pathname.split('/').pop()