app/js/listing.js in servel-0.23.0 vs app/js/listing.js in servel-0.24.0

- old
+ new

@@ -1,9 +1,8 @@ "use strict"; var Listing = (function() { - var $; var $container; var perPage = 99; var currentIndex; var moreContent; var scrollDebounce = false; @@ -59,14 +58,10 @@ function render() { var currentEntries = Entries.all().slice(currentIndex, currentIndex + perPage); $container.insertAdjacentHTML("beforeend", renderTable(currentEntries)); } - function atBottom() { - return (window.scrollY + window.innerHeight) == document.body.scrollHeight; - } - function onScrolled() { if(atBottom() && moreContent) { currentIndex += perPage; if(currentIndex >= Entries.all().length) moreContent = false; render(); @@ -129,10 +124,9 @@ moreContent = true; render(); } function init() { - $ = document.querySelector.bind(document); $container = $("#listing-container"); onEntriesUpdate(); initEvents(); \ No newline at end of file