forked from rDrama/rDrama
1
0
Fork 0

minor fix

master
Aevann 2022-12-27 03:44:20 +02:00
parent 150125c650
commit 8bb55236e3
1 changed files with 7 additions and 9 deletions

View File

@ -4,16 +4,14 @@
{% set song = "/" ~ path ~ "/" ~ listdir('files/' ~ path)|random() ~ '?v=45' %}
{% endif %}
<script nonce="{{g.nonce}}">
const audio = new Audio("{{song}}");
audio.loop=true;
function play() {
audio.play();
}
audio.loop=true;
window.addEventListener('load', function() {
const audio = new Audio("{{song}}");
audio.loop=true;
function play() {
audio.play();
}
audio.play();
window.addEventListener('click', () => {
if (audio.paused) audio.play();