federating my verse (iceshrimp & mastodon API compat, read-only)

This commit is contained in:
ari melody 2024-06-17 21:17:27 +01:00
parent 8dc8190cdf
commit da93978820
Signed by: ari
GPG key ID: CF99829C92678188
67 changed files with 2743 additions and 649 deletions

17
src/sound.js Normal file
View file

@ -0,0 +1,17 @@
const sounds = {
"default": new Audio("sound/log.ogg"),
"post": new Audio("sound/success.ogg"),
"boost": new Audio("sound/hello.ogg"),
};
export function play_sound(name) {
if (!name) name = "default";
const sound = sounds[name];
if (!sound) {
console.warn(`Attempted to play sound "${name}", which does not exist!`);
return;
}
sound.pause();
sound.currentTime = 0;
sound.play();
}