diff --git a/res/static/song.js b/res/static/song.js index 50fd498..34c6975 100644 --- a/res/static/song.js +++ b/res/static/song.js @@ -33,12 +33,16 @@ function transpose(n) { function transposeAdd(n) { for (c of document.getElementsByClassName('c')) { chord = c.innerHTML + nbsp = chord.endsWith(" ") + if (nbsp) { + chord = chord.slice(0, -6) + } if (LAT_INDEX[chord] == undefined) { throw Error("Unknown chord: " + chord) } i = LAT_INDEX[chord] j = (i + n + 12) % 12 - c.innerHTML = CHORDS_LAT[j] + c.innerHTML = CHORDS_LAT[j] + (nbsp ? " " : "") } setTransposeSelector(getTranspose() + n)