aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/views.js b/views.js
index 1878b3c..f4b5569 100644
--- a/views.js
+++ b/views.js
@@ -150,13 +150,14 @@ function profilePage (src, keys) {
bog().then(log => {
var index = 0
if (log) {
- var posts = log.slice(index, index + 25)
+ var posts = log.slice(index, index + 33)
addPosts(posts, keys).then(done => {
- index = index + 25
+ index = index + 33
window.onscroll = function(ev) {
- if (((window.innerHeight + window.scrollY) >= document.body.scrollHeight) && (window.location.hash.substring(1) === src)) {
- posts = log.slice(index, index + 25)
- index = index + 25
+ console.log(document.body.scrollHeight)
+ if (((window.innerHeight + window.scrollY) >= (document.body.scrollHeight - 2500)) && (window.location.hash.substring(1) === src)) {
+ posts = log.slice(index, index + 33)
+ index = index + 33
addPosts(posts, keys)
console.log("Bottom of page")
}