File size: 1,218 Bytes
6778ee0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Plausible Playwright tests</title>
<script async src="/tracker/js/plausible.local.js"></script>
</head>
<body>
<div id="main" style="height: 3000px; background-color: lightblue">
<a id="navigate-away" href="/manual.html">Navigate away</a>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const mainDiv = document.getElementById('main')
let loadedMore = false
window.addEventListener('scroll', () => {
if (
!loadedMore &&
window.innerHeight + window.scrollY >= document.body.offsetHeight
) {
loadedMore = true
const newDiv = document.createElement('div')
newDiv.setAttribute('id', 'more-content')
newDiv.setAttribute(
'style',
'height: 2000px; background-color: lightcoral;'
)
document.body.appendChild(newDiv)
}
})
})
</script>
</body>
</html>
|