mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
check if there is follow element
This commit is contained in:
@@ -195,12 +195,14 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.emit('api:topic.followCheck', tid);
|
socket.emit('api:topic.followCheck', tid);
|
||||||
followEl[0].addEventListener('click', function() {
|
if(followEl[0]) {
|
||||||
socket.emit('api:topic.follow', tid);
|
followEl[0].addEventListener('click', function() {
|
||||||
}, false);
|
socket.emit('api:topic.follow', tid);
|
||||||
|
}, false);
|
||||||
|
}
|
||||||
|
|
||||||
// Infinite scrolling of posts
|
|
||||||
$(window).off('scroll').on('scroll', function() {
|
$(window).off('scroll').on('scroll', function() {
|
||||||
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
var bottom = (document.body.offsetHeight - $(window).height()) * 0.9;
|
||||||
|
|
||||||
|
|||||||
@@ -230,6 +230,9 @@ var express = require('express'),
|
|||||||
var posts = topicData.posts.push(topicData.main_posts[0]),
|
var posts = topicData.posts.push(topicData.main_posts[0]),
|
||||||
lastMod = 0,
|
lastMod = 0,
|
||||||
timestamp;
|
timestamp;
|
||||||
|
|
||||||
|
console.log(topicData.main_posts);
|
||||||
|
|
||||||
for(var x=0,numPosts=topicData.posts.length;x<numPosts;x++) {
|
for(var x=0,numPosts=topicData.posts.length;x<numPosts;x++) {
|
||||||
timestamp = parseInt(topicData.posts[x].timestamp, 10);
|
timestamp = parseInt(topicData.posts[x].timestamp, 10);
|
||||||
if (timestamp > lastMod) lastMod = timestamp;
|
if (timestamp > lastMod) lastMod = timestamp;
|
||||||
|
|||||||
Reference in New Issue
Block a user