summaryrefslogtreecommitdiff
path: root/src/main/resources/templates
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2024-01-10 09:22:51 +0100
committerPaul-Christian Volkmer2024-01-10 09:22:51 +0100
commitfad2f33fd600cce136af58343980eda9541c66a4 (patch)
tree62e7a255add55661cc1076a391fb6ce247d189e0 /src/main/resources/templates
parentd88e2973da6988ca93521348836151f1ee6a8444 (diff)
refactor: use event listener to listen for page load event
Diffstat (limited to 'src/main/resources/templates')
-rw-r--r--src/main/resources/templates/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html
index ec8b3c7..c2ade61 100644
--- a/src/main/resources/templates/index.html
+++ b/src/main/resources/templates/index.html
@@ -51,7 +51,7 @@
</main>
<script th:src="@{/scripts.js}"></script>
<script>
- window.onload = () => {
+ window.addEventListener('load', () => {
let keyBindings = {
'w': 'first-page-link',
'a': 'prev-page-link',
@@ -66,7 +66,7 @@
}
}
};
- };
+ });
</script>
</body>
</html> \ No newline at end of file