Small backlink reflow

This commit is contained in:
Zixaphir 2014-03-20 09:42:48 -07:00
parent 18db3994b6
commit c45807c9b9
3 changed files with 11 additions and 14 deletions

View File

@ -5272,7 +5272,7 @@
}
},
secondNode: function() {
var backlink, container, post, quoteID, _i, _j, _len, _len1, _ref, _ref1;
var backlink, container, map, post, quoteID, _i, _j, _len, _len1, _ref;
if (!(this.isReply || Conf['OP Backlinks'])) {
return;
}
@ -5288,10 +5288,9 @@
this.nodes.backlinkContainer = container = $.el('span', {
className: 'backlink-container'
});
if (this.fullID in QuoteBacklink.map) {
_ref1 = QuoteBacklink.map[this.fullID];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
quoteID = _ref1[_j];
if (map = QuoteBacklink.map[this.fullID]) {
for (_j = 0, _len1 = map.length; _j < _len1; _j++) {
quoteID = map[_j];
if (post = g.posts[quoteID]) {
$.add(container, QuoteBacklink.buildBacklink(this, post));
}

View File

@ -5324,7 +5324,7 @@
}
},
secondNode: function() {
var backlink, container, post, quoteID, _i, _j, _len, _len1, _ref, _ref1;
var backlink, container, map, post, quoteID, _i, _j, _len, _len1, _ref;
if (!(this.isReply || Conf['OP Backlinks'])) {
return;
}
@ -5340,10 +5340,9 @@
this.nodes.backlinkContainer = container = $.el('span', {
className: 'backlink-container'
});
if (this.fullID in QuoteBacklink.map) {
_ref1 = QuoteBacklink.map[this.fullID];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
quoteID = _ref1[_j];
if (map = QuoteBacklink.map[this.fullID]) {
for (_j = 0, _len1 = map.length; _j < _len1; _j++) {
quoteID = map[_j];
if (post = g.posts[quoteID]) {
$.add(container, QuoteBacklink.buildBacklink(this, post));
}

View File

@ -47,10 +47,9 @@ QuoteBacklink =
return
@nodes.backlinkContainer = container = $.el 'span',
className: 'backlink-container'
if @fullID of QuoteBacklink.map
for quoteID in QuoteBacklink.map[@fullID]
if post = g.posts[quoteID] # Post hasn't been collected since.
$.add container, QuoteBacklink.buildBacklink @, post
if map = QuoteBacklink.map[@fullID]
for quoteID in map when post = g.posts[quoteID] # Post hasn't been collected since.
$.add container, QuoteBacklink.buildBacklink @, post
$.add @nodes.info, container
buildBacklink: (quoted, quoter) ->