Hi team,
what would be the most straightforward way to modify the infinitescroll.js to have it load new posts only when a button is clicked? My thinking is something along these lines:
HTML: <button id=“load-posts”>Load more posts</button>
JS:
var loadPosts = document.querySelector("#load-posts");
function onClick() {
requestTick();
}
loadPosts.addEventListener(“click”, onClick);
// window.addEventListener(“scroll”, onScroll, { passive: true });