@dang regarding pagination
// Get the anchor tag element
const anchorTag = document.querySelector('.morelink');
// Add a scroll event listener to the window object
window.addEventListener('scroll', () => {
// Check if the user has scrolled to the bottom of the page
if (window.innerHeight + window.scrollY >= document.body.offsetHeight) {
// Fetch the content from the URL stored in the anchor tag's href attribute
const xhr = new XMLHttpRequest();
xhr.open('GET', anchorTag.href, true);
xhr.onload = () => {
// Append the fetched content to the page
const div = document.createElement('div');
div.innerHTML = xhr.responseText;
document.body.appendChild(div);
};
xhr.send();
}
});
replies(3):