Forward links.
This commit is contained in:
parent
9cd4248491
commit
cdbc79c8c9
12
4chan_x.js
12
4chan_x.js
@ -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';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user