mirror of
https://gitlab.com/parroquia-san-leandro/cancionero-web.git
synced 2025-04-27 07:36:17 +02:00
minimizar espacio vertical y mostrar-ocultar acordes
This commit is contained in:
parent
e6b10585b7
commit
e838b066de
2 changed files with 14 additions and 15 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue