click on back element instead of window.location override
This commit is contained in:
parent
16caa08bba
commit
5cc955154c
|
@ -51,7 +51,7 @@ window.onkeyup = function (event) {
|
|||
sound.seek(sound.seek()+10);
|
||||
}
|
||||
else if (event.key === "Escape") {
|
||||
window.location = '../';
|
||||
document.getElementById("back").click();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -83,6 +83,7 @@ function playSong(url) {
|
|||
src: [url],
|
||||
html5: true
|
||||
});
|
||||
|
||||
setState("loading");
|
||||
sound.play();
|
||||
sound.loop(repeat);
|
||||
|
@ -165,4 +166,4 @@ function formatTime(secs) {
|
|||
const minutes = Math.floor(secs / 60) || 0;
|
||||
const seconds = (secs - minutes * 60) || 0;
|
||||
return minutes + ':' + (seconds < 10 ? '0' : '') + seconds;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue