Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
31 righe
1.2 KiB
31 righe
1.2 KiB
<script type="text/javascript"> |
|
window.current_page = <?=$page ?? 0?>; |
|
window.type = '<?=$type ?? ""?>'; |
|
window.search = '<?=$search ?? ""?>'; |
|
window.module = '<?=$module ?? "all"?>'; |
|
window.hierarchy = '<?=$hierarchy ?? "all"?>'; |
|
window.begin = '<?=$begin ?? ""?>' |
|
window.end = '<?=$end ?? ""?>';; |
|
|
|
var element = document.querySelector("main"); |
|
element.addEventListener('scroll', async (event) => { |
|
if (element.scrollHeight == |
|
element.scrollTop + |
|
window.innerHeight) { |
|
let params = [ |
|
"command=page", |
|
`type=${window.type}`, |
|
`module=${window.module}`, |
|
`hirearchy=${window.hierarchy}`, |
|
`page=${window.current_page + 1}`, |
|
`begin=${window.begin}`, |
|
`end=${window.end}`, |
|
] |
|
window.current_page++; |
|
let callback = "<?php echo $this->endpoint?>"; |
|
callback += "?" + params.join("&"); |
|
const response = await fetch(callback) |
|
document.querySelector(".changelogs-container").innerHTML += await response.text(); |
|
} |
|
}); |
|
</script>
|
|
|