fix the contunation bug :p

This commit is contained in:
ashley 2024-07-24 12:49:18 +00:00
parent 98dd3d1135
commit 0b2917e40d

View file

@ -1276,11 +1276,23 @@ width: fit-content;
</div> </div>
<% if (!isMobile) { %> <% if (!isMobile) { %>
<script> window.addEventListener('scroll', function() { <script>
window.addEventListener('scroll', function() {
if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) { if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
window.location.href = window.location.href + '&continuation=<%=tj.continuation%>'; var currentUrl = new URL(window.location.href);
var params = new URLSearchParams(currentUrl.search);
var continuationValue = '<%=tj.continuation%>';
if (params.has('continuation')) {
params.set('continuation', continuationValue);
} else {
params.append('continuation', continuationValue);
} }
});
currentUrl.search = params.toString();
window.location.href = currentUrl.toString();
}
});
</script> <% } %> </script> <% } %>
<% } %> <% } %>