Go deeper
This commit is contained in:
parent
19bfaa923d
commit
9927dc85f8
45
4chan_x.js
45
4chan_x.js
@ -1681,38 +1681,37 @@
|
||||
return g.callbacks.push(quoteBacklink.node);
|
||||
},
|
||||
node: function(root) {
|
||||
var backlink, el, id, link, nogood, quote, _i, _len, _ref, _results;
|
||||
var backlink, el, good, id, link, quote, _i, _len, _ref, _results;
|
||||
_ref = $$('a.quotelink', root);
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
quote = _ref[_i];
|
||||
el = d.getElementById(quote.textContent.slice(2));
|
||||
_results.push((function() {
|
||||
var _j, _len2, _ref2;
|
||||
if (el = d.getElementById(quote.textContent.slice(2))) {
|
||||
if (el && el.className !== 'op') {
|
||||
good = 1;
|
||||
id = quote.parentNode.parentNode.parentNode.id;
|
||||
if (el.className !== 'op') {
|
||||
nogood = 0;
|
||||
_ref2 = $$('a.backlink', el);
|
||||
for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) {
|
||||
backlink = _ref2[_j];
|
||||
if (backlink.textContent === '>>' + id) {
|
||||
nogood = 1;
|
||||
break;
|
||||
}
|
||||
_ref2 = $$('a.backlink', el);
|
||||
for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) {
|
||||
backlink = _ref2[_j];
|
||||
if (backlink.textContent === '>>' + id) {
|
||||
good = 0;
|
||||
break;
|
||||
}
|
||||
if (!nogood) {
|
||||
link = $.el('a', {
|
||||
href: '#' + id,
|
||||
className: 'backlink',
|
||||
textContent: '>>' + id
|
||||
});
|
||||
if ($.config('Quote Preview')) {
|
||||
$.bind(link, 'mouseover', quotePreview.mouseover);
|
||||
$.bind(link, 'mousemove', ui.hover);
|
||||
$.bind(link, 'mouseout', ui.hoverend);
|
||||
}
|
||||
return $.before($('br, blockquote', el), link);
|
||||
}
|
||||
if (good) {
|
||||
link = $.el('a', {
|
||||
href: '#' + id,
|
||||
className: 'backlink',
|
||||
textContent: '>>' + id
|
||||
});
|
||||
if ($.config('Quote Preview')) {
|
||||
$.bind(link, 'mouseover', quotePreview.mouseover);
|
||||
$.bind(link, 'mousemove', ui.hover);
|
||||
$.bind(link, 'mouseout', ui.hoverend);
|
||||
}
|
||||
return $.before($('br, blockquote', el), link);
|
||||
}
|
||||
}
|
||||
})());
|
||||
|
||||
@ -1346,24 +1346,24 @@ quoteBacklink =
|
||||
g.callbacks.push quoteBacklink.node
|
||||
node: (root) ->
|
||||
for quote in $$ 'a.quotelink', root
|
||||
if el = d.getElementById quote.textContent[2..]
|
||||
el = d.getElementById(quote.textContent[2..])
|
||||
if el and el.className isnt 'op'
|
||||
good = 1
|
||||
id = quote.parentNode.parentNode.parentNode.id
|
||||
unless el.className is 'op'
|
||||
nogood = 0
|
||||
for backlink in $$ 'a.backlink', el
|
||||
if backlink.textContent is '>>'+id
|
||||
nogood = 1
|
||||
break
|
||||
unless nogood
|
||||
link = $.el 'a'
|
||||
href: '#'+id
|
||||
className: 'backlink'
|
||||
textContent: '>>'+id
|
||||
if $.config 'Quote Preview'
|
||||
$.bind link, 'mouseover', quotePreview.mouseover
|
||||
$.bind link, 'mousemove', ui.hover
|
||||
$.bind link, 'mouseout', ui.hoverend
|
||||
$.before $('br, blockquote', el), link
|
||||
for backlink in $$ 'a.backlink', el
|
||||
if backlink.textContent is '>>'+id
|
||||
good = 0
|
||||
break
|
||||
if good
|
||||
link = $.el 'a',
|
||||
href: '#'+id
|
||||
className: 'backlink'
|
||||
textContent: '>>'+id
|
||||
if $.config 'Quote Preview'
|
||||
$.bind link, 'mouseover', quotePreview.mouseover
|
||||
$.bind link, 'mousemove', ui.hover
|
||||
$.bind link, 'mouseout', ui.hoverend
|
||||
$.before $('br, blockquote', el), link
|
||||
|
||||
quotePreview =
|
||||
init: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user