don't backlink op
This commit is contained in:
parent
4f15a8d7c1
commit
f3d0168f6e
@ -1678,9 +1678,10 @@
|
|||||||
return g.callbacks.push(quoteBacklink.node);
|
return g.callbacks.push(quoteBacklink.node);
|
||||||
},
|
},
|
||||||
node: function(root) {
|
node: function(root) {
|
||||||
var el, id, link, qid, quote, quotes, _i, _len, _ref, _results;
|
var el, id, link, qid, quote, quotes, tid, _i, _len, _ref, _results;
|
||||||
id = root.id || $('td[id]', root).id;
|
id = root.id || $('td[id]', root).id;
|
||||||
quotes = {};
|
quotes = {};
|
||||||
|
tid = g.THREAD_ID;
|
||||||
_ref = $$('a.quotelink', root);
|
_ref = $$('a.quotelink', root);
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
quote = _ref[_i];
|
quote = _ref[_i];
|
||||||
@ -1688,6 +1689,9 @@
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
qid = qid[0];
|
qid = qid[0];
|
||||||
|
if (qid === tid) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
quotes[qid] = quote;
|
quotes[qid] = quote;
|
||||||
}
|
}
|
||||||
_results = [];
|
_results = [];
|
||||||
|
|||||||
@ -1352,9 +1352,12 @@ quoteBacklink =
|
|||||||
#better coffee-script way of doing this?
|
#better coffee-script way of doing this?
|
||||||
id = root.id or $('td[id]', root).id
|
id = root.id or $('td[id]', root).id
|
||||||
quotes = {}
|
quotes = {}
|
||||||
|
tid = g.THREAD_ID
|
||||||
for quote in $$ 'a.quotelink', root
|
for quote in $$ 'a.quotelink', root
|
||||||
continue unless qid = quote.textContent.match /\d+/
|
continue unless qid = quote.textContent.match /\d+/
|
||||||
[qid] = qid
|
[qid] = qid
|
||||||
|
#don't backlink the op
|
||||||
|
continue if qid == tid
|
||||||
#duplicate quotes get overwritten
|
#duplicate quotes get overwritten
|
||||||
quotes[qid] = quote
|
quotes[qid] = quote
|
||||||
for qid, quote of quotes
|
for qid, quote of quotes
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user