Refactor, implement two buttons pt.1
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
e3625a31cf
commit
9bc7f2e633
3 changed files with 36 additions and 16 deletions
|
@ -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 :)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue