Merge branch 'revert-5169cf12' into 'master'
Revert "modified: s/index.tpl.html"
This reverts commit 5169cf12bd
See merge request !3
This commit is contained in:
commit
d8613a0190
|
@ -14,13 +14,13 @@
|
||||||
</ul>
|
</ul>
|
||||||
<script src="./s/jquery-3.1.0.min.js"></script>
|
<script src="./s/jquery-3.1.0.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var scrollListener = () => {
|
var scrollListener = function () {
|
||||||
$(window).one("scroll", () => {
|
$(window).one("scroll", function () {
|
||||||
if($(window).scrollTop() + 256 >= $(document).height() - $(window).height()) {
|
if($(window).scrollTop() + 256 >= $(document).height() - $(window).height()) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: './api/p/'+$('#posts').data('last'),
|
url: './api/p/'+$('#posts').data('last'),
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: (msg) => {
|
success: function(msg) {
|
||||||
var html = "";
|
var html = "";
|
||||||
for(var i = 0; i < msg.items.length; i++)
|
for(var i = 0; i < msg.items.length; i++)
|
||||||
if(msg.items[i].id)
|
if(msg.items[i].id)
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
setTimeout(scrollListener, 200);
|
setTimeout(scrollListener, 200);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
$(document).ready(() => {
|
$(document).ready(function () {
|
||||||
scrollListener();
|
scrollListener();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user