what is the opposite of pig disgusting?

This commit is contained in:
James Campos 2011-05-09 23:13:02 -07:00
parent 15ffeb2726
commit 8af31eb927
2 changed files with 15 additions and 22 deletions

View File

@ -1693,25 +1693,19 @@
return g.callbacks.push(quoteBacklink.node); return g.callbacks.push(quoteBacklink.node);
}, },
node: function(root) { node: function(root) {
var backlink, el, good, id, link, quote, _i, _j, _len, _len2, _ref, _ref2, _results; var el, id, link, qid, quote, quotes, _i, _len, _ref, _results;
id = $('td[id]', root).id; id = $('td[id]', root).id;
quotes = {};
_ref = $$('a.quotelink', root); _ref = $$('a.quotelink', root);
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
quote = _ref[_i]; quote = _ref[_i];
if (!(el = d.getElementById(quote.textContent.slice(2)))) { qid = quote.textContent.slice(2);
continue; quotes[qid] = quote;
} }
good = 1; _results = [];
_ref2 = $$('a.backlink', el); for (qid in quotes) {
for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { quote = quotes[qid];
backlink = _ref2[_j]; if (!(el = d.getElementById(qid))) {
if (backlink.textContent === '>>' + id) {
good = 0;
break;
}
}
if (!good) {
continue; continue;
} }
link = $.el('a', { link = $.el('a', {

View File

@ -1352,14 +1352,13 @@ quoteBacklink =
g.callbacks.push quoteBacklink.node g.callbacks.push quoteBacklink.node
node: (root) -> node: (root) ->
{id} = $ 'td[id]', root {id} = $ 'td[id]', root
quotes = {}
for quote in $$ 'a.quotelink', root for quote in $$ 'a.quotelink', root
continue unless el = d.getElementById quote.textContent[2..] qid = quote.textContent[2..] #FIXME cross-board links
good = 1 #duplicate quotes get overwritten
for backlink in $$ 'a.backlink', el quotes[qid] = quote
if backlink.textContent is '>>'+id for qid, quote of quotes
good = 0 continue unless el = d.getElementById qid
break
continue if not good
link = $.el 'a', link = $.el 'a',
href: '#'+id href: '#'+id
className: 'backlink' className: 'backlink'