Revert "minor fix"

This reverts commit 8bb55236e3.
pull/83/head
Aevann 2022-12-27 04:18:59 +02:00
parent 219482c745
commit 9485ffc21d
1 changed files with 9 additions and 7 deletions

View File

@ -4,14 +4,16 @@
{% 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();