Well, I was stupid. Oh well.
This commit is contained in:
parent
643e20a2d8
commit
7f59f65202
@ -8274,7 +8274,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
setup: function() {
|
setup: function() {
|
||||||
var ID, err, post, posts;
|
var ID, post, posts;
|
||||||
|
|
||||||
$.off(d, '4chanXInitFinished', QuoteThreading.setup);
|
$.off(d, '4chanXInitFinished', QuoteThreading.setup);
|
||||||
posts = g.posts;
|
posts = g.posts;
|
||||||
@ -8283,19 +8283,14 @@
|
|||||||
for (ID in posts) {
|
for (ID in posts) {
|
||||||
post = posts[ID];
|
post = posts[ID];
|
||||||
if (post.cb) {
|
if (post.cb) {
|
||||||
try {
|
post.cb.call(post);
|
||||||
post.cb.call(post);
|
|
||||||
} catch (_error) {
|
|
||||||
err = _error;
|
|
||||||
console.log(err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
return QuoteThreading.hasRun = true;
|
return QuoteThreading.hasRun = true;
|
||||||
},
|
},
|
||||||
node: function() {
|
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) {
|
if (this.isClone || !QuoteThreading.enabled || this.thread.OP === this) {
|
||||||
return;
|
return;
|
||||||
@ -8325,14 +8320,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
len = ("" + g.BOARD).length + 1;
|
||||||
for (_j = 0, _len1 = quotes.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = quotes.length; _j < _len1; _j++) {
|
||||||
quote = quotes[_j];
|
quote = quotes[_j];
|
||||||
qid = quote;
|
qid = quote;
|
||||||
if (!(qid.slice(2) < ID)) {
|
if (!(qid.slice(len) < ID)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (qid in posts) {
|
if (qid in posts) {
|
||||||
uniq[qid.slice(2)] = true;
|
uniq[qid.slice(len)] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8291,7 +8291,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
setup: function() {
|
setup: function() {
|
||||||
var ID, err, post, posts;
|
var ID, post, posts;
|
||||||
|
|
||||||
$.off(d, '4chanXInitFinished', QuoteThreading.setup);
|
$.off(d, '4chanXInitFinished', QuoteThreading.setup);
|
||||||
posts = g.posts;
|
posts = g.posts;
|
||||||
@ -8300,19 +8300,14 @@
|
|||||||
for (ID in posts) {
|
for (ID in posts) {
|
||||||
post = posts[ID];
|
post = posts[ID];
|
||||||
if (post.cb) {
|
if (post.cb) {
|
||||||
try {
|
post.cb.call(post);
|
||||||
post.cb.call(post);
|
|
||||||
} catch (_error) {
|
|
||||||
err = _error;
|
|
||||||
console.log(err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
return QuoteThreading.hasRun = true;
|
return QuoteThreading.hasRun = true;
|
||||||
},
|
},
|
||||||
node: function() {
|
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) {
|
if (this.isClone || !QuoteThreading.enabled || this.thread.OP === this) {
|
||||||
return;
|
return;
|
||||||
@ -8342,14 +8337,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
len = ("" + g.BOARD).length + 1;
|
||||||
for (_j = 0, _len1 = quotes.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = quotes.length; _j < _len1; _j++) {
|
||||||
quote = quotes[_j];
|
quote = quotes[_j];
|
||||||
qid = quote;
|
qid = quote;
|
||||||
if (!(qid.slice(2) < ID)) {
|
if (!(qid.slice(len) < ID)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (qid in posts) {
|
if (qid in posts) {
|
||||||
uniq[qid.slice(2)] = true;
|
uniq[qid.slice(len)] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8193,7 +8193,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
setup: function() {
|
setup: function() {
|
||||||
var ID, err, post, posts;
|
var ID, post, posts;
|
||||||
|
|
||||||
$.off(d, '4chanXInitFinished', QuoteThreading.setup);
|
$.off(d, '4chanXInitFinished', QuoteThreading.setup);
|
||||||
posts = g.posts;
|
posts = g.posts;
|
||||||
@ -8202,19 +8202,14 @@
|
|||||||
for (ID in posts) {
|
for (ID in posts) {
|
||||||
post = posts[ID];
|
post = posts[ID];
|
||||||
if (post.cb) {
|
if (post.cb) {
|
||||||
try {
|
post.cb.call(post);
|
||||||
post.cb.call(post);
|
|
||||||
} catch (_error) {
|
|
||||||
err = _error;
|
|
||||||
console.log(err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
return QuoteThreading.hasRun = true;
|
return QuoteThreading.hasRun = true;
|
||||||
},
|
},
|
||||||
node: function() {
|
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) {
|
if (this.isClone || !QuoteThreading.enabled || this.thread.OP === this) {
|
||||||
return;
|
return;
|
||||||
@ -8244,14 +8239,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
len = ("" + g.BOARD).length + 1;
|
||||||
for (_j = 0, _len1 = quotes.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = quotes.length; _j < _len1; _j++) {
|
||||||
quote = quotes[_j];
|
quote = quotes[_j];
|
||||||
qid = quote;
|
qid = quote;
|
||||||
if (!(qid.slice(2) < ID)) {
|
if (!(qid.slice(len) < ID)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (qid in posts) {
|
if (qid in posts) {
|
||||||
uniq[qid.slice(2)] = true;
|
uniq[qid.slice(len)] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,10 +33,7 @@ QuoteThreading =
|
|||||||
|
|
||||||
for ID, post of posts
|
for ID, post of posts
|
||||||
if post.cb
|
if post.cb
|
||||||
try
|
post.cb.call post
|
||||||
post.cb.call post
|
|
||||||
catch err
|
|
||||||
console.log err
|
|
||||||
return
|
return
|
||||||
|
|
||||||
QuoteThreading.hasRun = true
|
QuoteThreading.hasRun = true
|
||||||
@ -68,11 +65,12 @@ QuoteThreading =
|
|||||||
if qid of posts
|
if qid of posts
|
||||||
uniq[qid] = true
|
uniq[qid] = true
|
||||||
else
|
else
|
||||||
|
len = "#{g.BOARD}".length + 1
|
||||||
for quote in quotes
|
for quote in quotes
|
||||||
qid = quote
|
qid = quote
|
||||||
continue unless qid[2..] < ID
|
continue unless qid[len..] < ID
|
||||||
if qid of posts
|
if qid of posts
|
||||||
uniq[qid[2..]] = true
|
uniq[qid[len..]] = true
|
||||||
|
|
||||||
keys = Object.keys uniq
|
keys = Object.keys uniq
|
||||||
return unless keys.length is 1
|
return unless keys.length is 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user