tweaked sounds on some buttons, renamed play_sound to playSound

This commit is contained in:
ari melody 2024-07-08 11:56:26 +01:00
parent 6e2e4e0c23
commit b9445cf832
Signed by: ari
GPG key ID: CF99829C92678188
8 changed files with 27 additions and 15 deletions

View file

@ -6,12 +6,12 @@ let sounds;
if (typeof Audio !== typeof undefined) {
sounds = {
"default": new Audio(sound_log),
"post": new Audio(sound_hello),
"boost": new Audio(sound_success),
"post": new Audio(sound_success),
"boost": new Audio(sound_hello),
};
}
export function play_sound(name) {
export function playSound(name) {
if (name === false) return;
if (!name) name = "default";
const sound = sounds[name];