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);
|
posts = Object.keys(Unread.thread.posts);
|
||||||
root = Unread.thread.posts[posts[posts.length - 1]].nodes.root;
|
root = Unread.thread.posts[posts[posts.length - 1]].nodes.root;
|
||||||
}
|
}
|
||||||
return $.on(window, 'load', function() {
|
if (Header.getBottomOf(root) < 0) {
|
||||||
if (Header.getBottomOf(root) < 0) {
|
return Header.scrollTo(root, down);
|
||||||
return Header.scrollTo(root, down);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
sync: function() {
|
sync: function() {
|
||||||
var lastReadPost;
|
var lastReadPost;
|
||||||
|
|||||||
@ -9434,11 +9434,9 @@
|
|||||||
posts = Object.keys(Unread.thread.posts);
|
posts = Object.keys(Unread.thread.posts);
|
||||||
root = Unread.thread.posts[posts[posts.length - 1]].nodes.root;
|
root = Unread.thread.posts[posts[posts.length - 1]].nodes.root;
|
||||||
}
|
}
|
||||||
return $.on(window, 'load', function() {
|
if (Header.getBottomOf(root) < 0) {
|
||||||
if (Header.getBottomOf(root) < 0) {
|
return Header.scrollTo(root, down);
|
||||||
return Header.scrollTo(root, down);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
sync: function() {
|
sync: function() {
|
||||||
var lastReadPost;
|
var lastReadPost;
|
||||||
|
|||||||
@ -46,11 +46,9 @@ Unread =
|
|||||||
# Scroll to the last read post.
|
# Scroll to the last read post.
|
||||||
posts = Object.keys Unread.thread.posts
|
posts = Object.keys Unread.thread.posts
|
||||||
{root} = Unread.thread.posts[posts[posts.length - 1]].nodes
|
{root} = Unread.thread.posts[posts[posts.length - 1]].nodes
|
||||||
# Prevent the browser to scroll back to
|
|
||||||
# the previous scroll location on page load.
|
# Scroll to the target unless we scrolled past it.
|
||||||
$.on window, 'load', ->
|
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: ->
|
sync: ->
|
||||||
lastReadPost = Unread.db.get
|
lastReadPost = Unread.db.get
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user