Fix an issue causing the thread updater to fail to reset its interval
This commit is contained in:
parent
ec7ec57b93
commit
72517e1d83
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.4.1 - 2014-03-06
|
* 4chan X - Version 1.4.1 - 2014-03-07
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.4.1 - 2014-03-06
|
* 4chan X - Version 1.4.1 - 2014-03-07
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
||||||
@ -9738,7 +9738,7 @@
|
|||||||
return new Notice('info', "The thread is " + change + ".", 30);
|
return new Notice('info', "The thread is " + change + ".", 30);
|
||||||
},
|
},
|
||||||
parse: function(postObjects) {
|
parse: function(postObjects) {
|
||||||
var OP, count, deletedFiles, deletedPosts, files, index, node, num, post, postObject, posts, root, scroll, sendEvent, _i, _j, _len, _len1;
|
var OP, count, deletedFiles, deletedPosts, files, index, node, num, post, postObject, posts, root, sendEvent, _i, _j, _len, _len1;
|
||||||
OP = postObjects[0];
|
OP = postObjects[0];
|
||||||
Build.spoilerRange[ThreadUpdater.thread.board] = OP.custom_spoiler;
|
Build.spoilerRange[ThreadUpdater.thread.board] = OP.custom_spoiler;
|
||||||
ThreadUpdater.updateThreadStatus('Sticky', !!OP.sticky);
|
ThreadUpdater.updateThreadStatus('Sticky', !!OP.sticky);
|
||||||
@ -9810,7 +9810,6 @@
|
|||||||
}
|
}
|
||||||
ThreadUpdater.lastPost = posts[count - 1].ID;
|
ThreadUpdater.lastPost = posts[count - 1].ID;
|
||||||
Main.callbackNodes(Post, posts);
|
Main.callbackNodes(Post, posts);
|
||||||
scroll = Conf['Auto Scroll'] && ThreadUpdater.scrollBG() && Header.getBottomOf(ThreadUpdater.root) > -25;
|
|
||||||
for (_j = 0, _len1 = posts.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = posts.length; _j < _len1; _j++) {
|
||||||
post = posts[_j];
|
post = posts[_j];
|
||||||
root = post.nodes.root;
|
root = post.nodes.root;
|
||||||
@ -9823,11 +9822,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sendEvent();
|
sendEvent();
|
||||||
if (scroll) {
|
if (Conf['Auto Scroll'] && ThreadUpdater.scrollBG() && Header.getBottomOf(ThreadUpdater.root) > -25) {
|
||||||
if (Conf['Bottom Scroll']) {
|
if (Conf['Bottom Scroll']) {
|
||||||
return window.scrollTo(0, d.body.clientHeight);
|
return window.scrollTo(0, d.body.clientHeight);
|
||||||
} else {
|
} else {
|
||||||
return Header.scrollTo(nodes[0]);
|
return Header.scrollTo(posts.nodes[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.4.1 - 2014-03-06
|
* 4chan X - Version 1.4.1 - 2014-03-07
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
* https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
||||||
@ -9753,7 +9753,7 @@
|
|||||||
return new Notice('info', "The thread is " + change + ".", 30);
|
return new Notice('info', "The thread is " + change + ".", 30);
|
||||||
},
|
},
|
||||||
parse: function(postObjects) {
|
parse: function(postObjects) {
|
||||||
var OP, count, deletedFiles, deletedPosts, files, index, node, num, post, postObject, posts, root, scroll, sendEvent, _i, _j, _len, _len1;
|
var OP, count, deletedFiles, deletedPosts, files, index, node, num, post, postObject, posts, root, sendEvent, _i, _j, _len, _len1;
|
||||||
OP = postObjects[0];
|
OP = postObjects[0];
|
||||||
Build.spoilerRange[ThreadUpdater.thread.board] = OP.custom_spoiler;
|
Build.spoilerRange[ThreadUpdater.thread.board] = OP.custom_spoiler;
|
||||||
ThreadUpdater.updateThreadStatus('Sticky', !!OP.sticky);
|
ThreadUpdater.updateThreadStatus('Sticky', !!OP.sticky);
|
||||||
@ -9825,7 +9825,6 @@
|
|||||||
}
|
}
|
||||||
ThreadUpdater.lastPost = posts[count - 1].ID;
|
ThreadUpdater.lastPost = posts[count - 1].ID;
|
||||||
Main.callbackNodes(Post, posts);
|
Main.callbackNodes(Post, posts);
|
||||||
scroll = Conf['Auto Scroll'] && ThreadUpdater.scrollBG() && Header.getBottomOf(ThreadUpdater.root) > -25;
|
|
||||||
for (_j = 0, _len1 = posts.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = posts.length; _j < _len1; _j++) {
|
||||||
post = posts[_j];
|
post = posts[_j];
|
||||||
root = post.nodes.root;
|
root = post.nodes.root;
|
||||||
@ -9838,11 +9837,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sendEvent();
|
sendEvent();
|
||||||
if (scroll) {
|
if (Conf['Auto Scroll'] && ThreadUpdater.scrollBG() && Header.getBottomOf(ThreadUpdater.root) > -25) {
|
||||||
if (Conf['Bottom Scroll']) {
|
if (Conf['Bottom Scroll']) {
|
||||||
return window.scrollTo(0, d.body.clientHeight);
|
return window.scrollTo(0, d.body.clientHeight);
|
||||||
} else {
|
} else {
|
||||||
return Header.scrollTo(nodes[0]);
|
return Header.scrollTo(posts.nodes[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -334,8 +334,6 @@ ThreadUpdater =
|
|||||||
ThreadUpdater.lastPost = posts[count - 1].ID
|
ThreadUpdater.lastPost = posts[count - 1].ID
|
||||||
Main.callbackNodes Post, posts
|
Main.callbackNodes Post, posts
|
||||||
|
|
||||||
scroll = Conf['Auto Scroll'] and ThreadUpdater.scrollBG() and Header.getBottomOf(ThreadUpdater.root) > -25
|
|
||||||
|
|
||||||
for post in posts
|
for post in posts
|
||||||
{root} = post.nodes
|
{root} = post.nodes
|
||||||
if post.cb
|
if post.cb
|
||||||
@ -345,8 +343,8 @@ ThreadUpdater =
|
|||||||
$.add ThreadUpdater.root, root
|
$.add ThreadUpdater.root, root
|
||||||
|
|
||||||
sendEvent()
|
sendEvent()
|
||||||
if scroll
|
if Conf['Auto Scroll'] and ThreadUpdater.scrollBG() and Header.getBottomOf(ThreadUpdater.root) > -25
|
||||||
if Conf['Bottom Scroll']
|
if Conf['Bottom Scroll']
|
||||||
window.scrollTo 0, d.body.clientHeight
|
window.scrollTo 0, d.body.clientHeight
|
||||||
else
|
else
|
||||||
Header.scrollTo nodes[0]
|
Header.scrollTo posts.nodes[0]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user