minimizar espacio vertical y mostrar-ocultar acordes

This commit is contained in:
Carlos Galindo 2022-11-22 19:22:00 +01:00
parent e6b10585b7
commit e838b066de
2 changed files with 14 additions and 15 deletions

View file

@ -73,20 +73,18 @@ function getTranspose() {
// Init
window.onload = function () {
var show = localStorage.getItem("show_chords") == "true";
var show = localStorage.getItem("show_chords") != "false";
showChords(show);
document.getElementById("showChords").checked = show;
};
function showChords(show) {
if (show || show == "true") {
document.getElementById("songLyrics").style.display = "none";
document.getElementById("songChords").style.display = "block";
document.getElementById("transposeControls").style.display = "block";
for (let e of document.getElementsByClassName("showChords")) { e.style.display = "block"; }
for (let e of document.getElementsByClassName("showLyrics")) { e.style.display = "none"; }
} else {
document.getElementById("songLyrics").style.display = "block";
document.getElementById("songChords").style.display = "none";
document.getElementById("transposeControls").style.display = "none";
for (let e of document.getElementsByClassName("showChords")) { e.style.display = "none"; }
for (let e of document.getElementsByClassName("showLyrics")) { e.style.display = "block"; }
}
localStorage.setItem("show_chords", show);
}