diff --git a/4chan_x.js b/4chan_x.js index f793bf5b0..914287c00 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1846,7 +1846,7 @@ return $.removeClass(d.getElementById(this.hash.slice(1)), 'qphl'); }, mouseover: function(e) { - var el, id, qp, req, threadID; + var el, id, qp, quote, replyID, req, threadID, _i, _len, _ref; if (!(id = this.hash.slice(1))) { return; } @@ -1854,6 +1854,16 @@ if (el = d.getElementById(id)) { qp.innerHTML = el.innerHTML; $.addClass(el, 'qphl'); + if (this.className === 'backlink') { + replyID = this.parentNode.id; + _ref = $$('a.quotelink', qp); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + quote = _ref[_i]; + if (quote.hash.slice(1) === replyID) { + quote.className = 'backlink'; + } + } + } } else { qp.innerHTML = "Loading " + id + "..."; threadID = this.pathname.split('/').pop(); diff --git a/script.coffee b/script.coffee index cdd3a6739..2c9e5603b 100644 --- a/script.coffee +++ b/script.coffee @@ -1472,6 +1472,11 @@ quotePreview = if el = d.getElementById id qp.innerHTML = el.innerHTML $.addClass el, 'qphl' + if @className is 'backlink' + replyID = @parentNode.id + for quote in $$ 'a.quotelink', qp + if quote.hash[1..] is replyID + quote.className = 'backlink' else qp.innerHTML = "Loading #{id}..." threadID = @pathname.split('/').pop()