And that should fix everything. Woo.

This commit is contained in:
Zixaphir 2014-01-06 08:45:17 -07:00
parent 5a080e7f60
commit 1c5c542ca1
5 changed files with 29 additions and 21 deletions

View File

@ -1,5 +1,5 @@
/*
* 4chan X - Version 1.2.44 - 2014-01-05
* 4chan X - Version 1.2.44 - 2014-01-06
*
* Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE

View File

@ -22,7 +22,7 @@
// ==/UserScript==
/*
* 4chan X - Version 1.2.44 - 2014-01-05
* 4chan X - Version 1.2.44 - 2014-01-06
*
* Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
@ -1466,6 +1466,9 @@
RandomAccessList.prototype.push = function(item) {
var ID, last;
ID = item.ID;
if (this[ID]) {
return;
}
last = this.last;
item.prev = last;
this[ID] = item;
@ -5026,7 +5029,7 @@
$.after(root, threadContainer);
} else {
threadContainer = root.nextSibling;
post = Get.postFromRoot($.x('child::div[contains(@class,"postContainer")][last()]', threadContainer));
post = Get.postFromRoot($.x('descendant::div[contains(@class,"postContainer")][last()]', threadContainer));
}
$.add(threadContainer, this.nodes.root);
if (!Conf['Unread Count'] || this.ID < Unread.lastReadPost) {
@ -5038,12 +5041,12 @@
}
if (posts[post.ID]) {
posts.after(post, this);
return true;
}
if ((ID = posts.closest(post.ID)) !== -1) {
posts.after(posts[ID], this);
} else {
if ((ID = posts.closest(post.ID)) !== -1) {
posts.after(posts[ID], this);
} else {
posts.prepend(this);
}
posts.prepend(this);
}
return true;
},

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript
/*
* 4chan X - Version 1.2.44 - 2014-01-05
* 4chan X - Version 1.2.44 - 2014-01-06
*
* Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
@ -1472,6 +1472,9 @@
RandomAccessList.prototype.push = function(item) {
var ID, last;
ID = item.ID;
if (this[ID]) {
return;
}
last = this.last;
item.prev = last;
this[ID] = item;
@ -5029,7 +5032,7 @@
$.after(root, threadContainer);
} else {
threadContainer = root.nextSibling;
post = Get.postFromRoot($.x('child::div[contains(@class,"postContainer")][last()]', threadContainer));
post = Get.postFromRoot($.x('descendant::div[contains(@class,"postContainer")][last()]', threadContainer));
}
$.add(threadContainer, this.nodes.root);
if (!Conf['Unread Count'] || this.ID < Unread.lastReadPost) {
@ -5041,12 +5044,12 @@
}
if (posts[post.ID]) {
posts.after(post, this);
return true;
}
if ((ID = posts.closest(post.ID)) !== -1) {
posts.after(posts[ID], this);
} else {
if ((ID = posts.closest(post.ID)) !== -1) {
posts.after(posts[ID], this);
} else {
posts.prepend(this);
}
posts.prepend(this);
}
return true;
},

View File

@ -4,6 +4,7 @@ class RandomAccessList
push: (item) ->
{ID} = item
return if @[ID]
{last} = @
item.prev = last
@[ID] = item

View File

@ -72,7 +72,7 @@ QuoteThreading =
posts.push @ if Conf['Unread Count']
return false
root = post.nodes.root
{root} = post.nodes
unless $.hasClass root, 'threadOP'
$.addClass root, 'threadOP'
threadContainer = $.el 'div',
@ -80,7 +80,7 @@ QuoteThreading =
$.after root, threadContainer
else
threadContainer = root.nextSibling
post = Get.postFromRoot $.x 'child::div[contains(@class,"postContainer")][last()]', threadContainer
post = Get.postFromRoot $.x 'descendant::div[contains(@class,"postContainer")][last()]', threadContainer
$.add threadContainer, @nodes.root
@ -92,11 +92,12 @@ QuoteThreading =
if posts[post.ID]
posts.after post, @
return true
if (ID = posts.closest post.ID) isnt -1
posts.after posts[ID], @
else
if (ID = posts.closest post.ID) isnt -1
posts.after posts[ID], @
else
posts.prepend @
posts.prepend @
return true