Refactor, implement two buttons pt.1

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2024-05-02 17:12:39 +05:00
parent e3625a31cf
commit 9bc7f2e633
Signed by: mctaylors
GPG key ID: 7181BEBE676903C1
3 changed files with 36 additions and 16 deletions

View file

@ -1,13 +1,18 @@
window.onload = function() {
play("error");
};
}
function play(audio) {
var audio = document.getElementById(audio);
audio.play();
};
function play(audioId) {
let audioElement = document.getElementById(audioId);
audioElement.play();
}
async function ok_button(href) {
function close_button(href) {
play("click");
window.location.href = href;
};
}
function details_button() {
play("click");
// TODO: this button does nothing for now :)
}