mirror of
https://gitlab.com/parroquia-san-leandro/cancionero-web.git
synced 2026-01-28 13:07:58 +01:00
use addEventListener for window load instead of onLoad
avoids conflicts between different files
This commit is contained in:
parent
67a3629c8a
commit
a485826e7c
2 changed files with 4 additions and 4 deletions
|
|
@ -84,11 +84,11 @@ function getTranspose(song) {
|
||||||
=========================================== */
|
=========================================== */
|
||||||
|
|
||||||
// Init
|
// Init
|
||||||
window.onload = function () {
|
window.addEventListener("load", function () {
|
||||||
var show = localStorage.getItem("show_chords") != "false";
|
var show = localStorage.getItem("show_chords") != "false";
|
||||||
showChords(show);
|
showChords(show);
|
||||||
document.getElementById("showChords").checked = show;
|
document.getElementById("showChords").checked = show;
|
||||||
};
|
});
|
||||||
|
|
||||||
function showChords(show) {
|
function showChords(show) {
|
||||||
if (show || show == "true") {
|
if (show || show == "true") {
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ function shareList(event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = function () {
|
window.addEventListener("load", function () {
|
||||||
for (let e of document.getElementsByClassName("init")) {
|
for (let e of document.getElementsByClassName("init")) {
|
||||||
e.dispatchEvent(new Event("change"));
|
e.dispatchEvent(new Event("change"));
|
||||||
}
|
}
|
||||||
|
|
@ -256,7 +256,7 @@ window.onload = function () {
|
||||||
showChords.checked = false;
|
showChords.checked = false;
|
||||||
showChords.dispatchEvent(new Event("change"));
|
showChords.dispatchEvent(new Event("change"));
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
</script>
|
</script>
|
||||||
{% include "footer.html" %}
|
{% include "footer.html" %}
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue