finish up the atom news feed API

This commit is contained in:
ngn
2025-01-04 19:59:44 +03:00
parent 26e8909998
commit 337e56de78
33 changed files with 2633 additions and 2633 deletions

16
app/src/lib/util.js Normal file
View File

@ -0,0 +1,16 @@
function click() {
let audio = new Audio("/click.wav");
audio.play();
}
let colors_pos = -1;
const colors = ["yellow", "cyan", "green", "pinkish", "red", "blue"];
function color() {
if (colors_pos < 0) colors_pos = Math.floor(Math.random() * colors.length);
else if (colors_pos >= colors.length) colors_pos = 0;
return colors[colors_pos];
}
export { click, color };