As far as I can tell, this wasn't working at all.
This commit is contained in:
parent
3d87a9cfb6
commit
c979f44028
@ -9451,11 +9451,9 @@
|
||||
posts = Object.keys(Unread.thread.posts);
|
||||
root = Unread.thread.posts[posts[posts.length - 1]].nodes.root;
|
||||
}
|
||||
return $.on(window, 'load', function() {
|
||||
if (Header.getBottomOf(root) < 0) {
|
||||
return Header.scrollTo(root, down);
|
||||
}
|
||||
});
|
||||
if (Header.getBottomOf(root) < 0) {
|
||||
return Header.scrollTo(root, down);
|
||||
}
|
||||
},
|
||||
sync: function() {
|
||||
var lastReadPost;
|
||||
|
||||
@ -9434,11 +9434,9 @@
|
||||
posts = Object.keys(Unread.thread.posts);
|
||||
root = Unread.thread.posts[posts[posts.length - 1]].nodes.root;
|
||||
}
|
||||
return $.on(window, 'load', function() {
|
||||
if (Header.getBottomOf(root) < 0) {
|
||||
return Header.scrollTo(root, down);
|
||||
}
|
||||
});
|
||||
if (Header.getBottomOf(root) < 0) {
|
||||
return Header.scrollTo(root, down);
|
||||
}
|
||||
},
|
||||
sync: function() {
|
||||
var lastReadPost;
|
||||
|
||||
@ -46,11 +46,9 @@ Unread =
|
||||
# Scroll to the last read post.
|
||||
posts = Object.keys Unread.thread.posts
|
||||
{root} = Unread.thread.posts[posts[posts.length - 1]].nodes
|
||||
# Prevent the browser to scroll back to
|
||||
# the previous scroll location on page load.
|
||||
$.on window, 'load', ->
|
||||
# Scroll to the target unless we scrolled past it.
|
||||
Header.scrollTo root, down if Header.getBottomOf(root) < 0
|
||||
|
||||
# Scroll to the target unless we scrolled past it.
|
||||
Header.scrollTo root, down if Header.getBottomOf(root) < 0
|
||||
|
||||
sync: ->
|
||||
lastReadPost = Unread.db.get
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user