mirror of
https://codeberg.org/ashley/poke.git
synced 2024-12-02 04:07:21 +01:00
fix the contunation bug :p
This commit is contained in:
parent
98dd3d1135
commit
0b2917e40d
1 changed files with 16 additions and 4 deletions
|
@ -1276,11 +1276,23 @@ width: fit-content;
|
||||||
</div>
|
</div>
|
||||||
<% if (!isMobile) { %>
|
<% if (!isMobile) { %>
|
||||||
|
|
||||||
<script> window.addEventListener('scroll', function() {
|
<script>
|
||||||
if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
window.addEventListener('scroll', function() {
|
||||||
window.location.href = window.location.href + '&continuation=<%=tj.continuation%>';
|
if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
||||||
|
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> <% } %>
|
||||||
|
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
Loading…
Reference in a new issue