Well, I was stupid. Oh well.

This commit is contained in:
Zixaphir 2013-04-18 02:35:29 -07:00
parent 643e20a2d8
commit 7f59f65202
4 changed files with 22 additions and 36 deletions

View File

@ -8274,7 +8274,7 @@
});
},
setup: function() {
var ID, err, post, posts;
var ID, post, posts;
$.off(d, '4chanXInitFinished', QuoteThreading.setup);
posts = g.posts;
@ -8283,19 +8283,14 @@
for (ID in posts) {
post = posts[ID];
if (post.cb) {
try {
post.cb.call(post);
} catch (_error) {
err = _error;
console.log(err);
}
post.cb.call(post);
}
}
return;
return QuoteThreading.hasRun = true;
},
node: function() {
var ID, keys, post, posts, qid, quote, quotes, uniq, _i, _j, _len, _len1;
var ID, keys, len, post, posts, qid, quote, quotes, uniq, _i, _j, _len, _len1;
if (this.isClone || !QuoteThreading.enabled || this.thread.OP === this) {
return;
@ -8325,14 +8320,15 @@
}
}
} else {
len = ("" + g.BOARD).length + 1;
for (_j = 0, _len1 = quotes.length; _j < _len1; _j++) {
quote = quotes[_j];
qid = quote;
if (!(qid.slice(2) < ID)) {
if (!(qid.slice(len) < ID)) {
continue;
}
if (qid in posts) {
uniq[qid.slice(2)] = true;
uniq[qid.slice(len)] = true;
}
}
}

View File

@ -8291,7 +8291,7 @@
});
},
setup: function() {
var ID, err, post, posts;
var ID, post, posts;
$.off(d, '4chanXInitFinished', QuoteThreading.setup);
posts = g.posts;
@ -8300,19 +8300,14 @@
for (ID in posts) {
post = posts[ID];
if (post.cb) {
try {
post.cb.call(post);
} catch (_error) {
err = _error;
console.log(err);
}
post.cb.call(post);
}
}
return;
return QuoteThreading.hasRun = true;
},
node: function() {
var ID, keys, post, posts, qid, quote, quotes, uniq, _i, _j, _len, _len1;
var ID, keys, len, post, posts, qid, quote, quotes, uniq, _i, _j, _len, _len1;
if (this.isClone || !QuoteThreading.enabled || this.thread.OP === this) {
return;
@ -8342,14 +8337,15 @@
}
}
} else {
len = ("" + g.BOARD).length + 1;
for (_j = 0, _len1 = quotes.length; _j < _len1; _j++) {
quote = quotes[_j];
qid = quote;
if (!(qid.slice(2) < ID)) {
if (!(qid.slice(len) < ID)) {
continue;
}
if (qid in posts) {
uniq[qid.slice(2)] = true;
uniq[qid.slice(len)] = true;
}
}
}

View File

@ -8193,7 +8193,7 @@
});
},
setup: function() {
var ID, err, post, posts;
var ID, post, posts;
$.off(d, '4chanXInitFinished', QuoteThreading.setup);
posts = g.posts;
@ -8202,19 +8202,14 @@
for (ID in posts) {
post = posts[ID];
if (post.cb) {
try {
post.cb.call(post);
} catch (_error) {
err = _error;
console.log(err);
}
post.cb.call(post);
}
}
return;
return QuoteThreading.hasRun = true;
},
node: function() {
var ID, keys, post, posts, qid, quote, quotes, uniq, _i, _j, _len, _len1;
var ID, keys, len, post, posts, qid, quote, quotes, uniq, _i, _j, _len, _len1;
if (this.isClone || !QuoteThreading.enabled || this.thread.OP === this) {
return;
@ -8244,14 +8239,15 @@
}
}
} else {
len = ("" + g.BOARD).length + 1;
for (_j = 0, _len1 = quotes.length; _j < _len1; _j++) {
quote = quotes[_j];
qid = quote;
if (!(qid.slice(2) < ID)) {
if (!(qid.slice(len) < ID)) {
continue;
}
if (qid in posts) {
uniq[qid.slice(2)] = true;
uniq[qid.slice(len)] = true;
}
}
}

View File

@ -33,10 +33,7 @@ QuoteThreading =
for ID, post of posts
if post.cb
try
post.cb.call post
catch err
console.log err
post.cb.call post
return
QuoteThreading.hasRun = true
@ -68,11 +65,12 @@ QuoteThreading =
if qid of posts
uniq[qid] = true
else
len = "#{g.BOARD}".length + 1
for quote in quotes
qid = quote
continue unless qid[2..] < ID
continue unless qid[len..] < ID
if qid of posts
uniq[qid[2..]] = true
uniq[qid[len..]] = true
keys = Object.keys uniq
return unless keys.length is 1