Forward links.

This commit is contained in:
Nicolas Stepien 2011-05-25 21:35:34 +02:00
parent 9cd4248491
commit cdbc79c8c9
2 changed files with 8 additions and 8 deletions

View File

@ -1868,19 +1868,19 @@
return $.removeClass(el, 'qphl');
},
mouseover: function(e) {
var el, id, qp, quote, replyID, threadID, url, _i, _len, _ref;
var el, id, qp, quote, replyID, threadID, url, _i, _len, _ref, _ref2;
id = this.hash.slice(1);
qp = $('#qp');
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];
replyID = (_ref = $.x('ancestor::*[@id][1]', this)) != null ? _ref.id.match(/\d+/)[0] : void 0;
_ref2 = $$('a.quotelink', qp);
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
quote = _ref2[_i];
if (quote.hash.slice(1) === replyID) {
quote.className = 'backlink';
quote.className = 'forwardlink';
}
}
}

View File

@ -1485,10 +1485,10 @@ quotePreview =
qp.innerHTML = el.innerHTML
$.addClass el, 'qphl'
if @className is 'backlink'
replyID = @parentNode.id
replyID = $.x('ancestor::*[@id][1]', @)?.id.match(/\d+/)[0]
for quote in $$ 'a.quotelink', qp
if quote.hash[1..] is replyID
quote.className = 'backlink'
quote.className = 'forwardlink'
else
qp.innerHTML = "Loading #{id}..."
threadID = @pathname.split('/').pop() or $.x('ancestor::div[@class="thread"]/div', @).id