dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 9b97cece312b254e7100ec516e780eaf28b5637c
parent f8303711c74ffdde97115e6b5bb13ec7cbf75dd2
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sat,  9 Nov 2024 12:13:06 -0800

add notification sound when game is over

Diffstat:
Mpkg/web/handlers/chess.go | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/pkg/web/handlers/chess.go b/pkg/web/handlers/chess.go @@ -658,6 +658,7 @@ Loop: // If we loaded the page and game was ongoing, we will stop the infinite loading page and display pgn if game.Outcome() != chess.NoOutcome && !gameLoadedOver { + send(`<audio src="/public/sounds/chess/GenericNotify.ogg" autoplay></audio>`) if game.Outcome() == chess.WhiteWon { send(`<style>#piece_e1_winner, #piece_e8_loser { animation: 2s 0s forwards winner_anim }</style>`) send(`<style>#piece_e1_winner, #piece_e8_loser { display: block !important; }</style>`)