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');
|
return $.removeClass(el, 'qphl');
|
||||||
},
|
},
|
||||||
mouseover: function(e) {
|
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);
|
id = this.hash.slice(1);
|
||||||
qp = $('#qp');
|
qp = $('#qp');
|
||||||
if (el = d.getElementById(id)) {
|
if (el = d.getElementById(id)) {
|
||||||
qp.innerHTML = el.innerHTML;
|
qp.innerHTML = el.innerHTML;
|
||||||
$.addClass(el, 'qphl');
|
$.addClass(el, 'qphl');
|
||||||
if (this.className === 'backlink') {
|
if (this.className === 'backlink') {
|
||||||
replyID = this.parentNode.id;
|
replyID = (_ref = $.x('ancestor::*[@id][1]', this)) != null ? _ref.id.match(/\d+/)[0] : void 0;
|
||||||
_ref = $$('a.quotelink', qp);
|
_ref2 = $$('a.quotelink', qp);
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
|
||||||
quote = _ref[_i];
|
quote = _ref2[_i];
|
||||||
if (quote.hash.slice(1) === replyID) {
|
if (quote.hash.slice(1) === replyID) {
|
||||||
quote.className = 'backlink';
|
quote.className = 'forwardlink';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1485,10 +1485,10 @@ quotePreview =
|
|||||||
qp.innerHTML = el.innerHTML
|
qp.innerHTML = el.innerHTML
|
||||||
$.addClass el, 'qphl'
|
$.addClass el, 'qphl'
|
||||||
if @className is 'backlink'
|
if @className is 'backlink'
|
||||||
replyID = @parentNode.id
|
replyID = $.x('ancestor::*[@id][1]', @)?.id.match(/\d+/)[0]
|
||||||
for quote in $$ 'a.quotelink', qp
|
for quote in $$ 'a.quotelink', qp
|
||||||
if quote.hash[1..] is replyID
|
if quote.hash[1..] is replyID
|
||||||
quote.className = 'backlink'
|
quote.className = 'forwardlink'
|
||||||
else
|
else
|
||||||
qp.innerHTML = "Loading #{id}..."
|
qp.innerHTML = "Loading #{id}..."
|
||||||
threadID = @pathname.split('/').pop() or $.x('ancestor::div[@class="thread"]/div', @).id
|
threadID = @pathname.split('/').pop() or $.x('ancestor::div[@class="thread"]/div', @).id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user