Revert "modified: s/index.tpl.html"

This reverts commit 5169cf12bd
This commit is contained in:
Flummi 2016-09-02 10:19:41 +00:00
parent 342eb2bc8c
commit d887d62111

View File

@ -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>