use addEventListener for window load instead of onLoad

avoids conflicts between different files
This commit is contained in:
Carlos Galindo 2026-01-23 19:39:49 +01:00
commit a485826e7c
2 changed files with 4 additions and 4 deletions

View file

@ -237,7 +237,7 @@ function shareList(event) {
}
}
window.onload = function () {
window.addEventListener("load", function () {
for (let e of document.getElementsByClassName("init")) {
e.dispatchEvent(new Event("change"));
}
@ -256,7 +256,7 @@ window.onload = function () {
showChords.checked = false;
showChords.dispatchEvent(new Event("change"));
}
};
});
</script>
{% include "footer.html" %}
</body>