forked from rDrama/rDrama
minor fix
parent
150125c650
commit
8bb55236e3
|
@ -4,16 +4,14 @@
|
||||||
{% set song = "/" ~ path ~ "/" ~ listdir('files/' ~ path)|random() ~ '?v=45' %}
|
{% set song = "/" ~ path ~ "/" ~ listdir('files/' ~ path)|random() ~ '?v=45' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script nonce="{{g.nonce}}">
|
<script nonce="{{g.nonce}}">
|
||||||
const audio = new Audio("{{song}}");
|
|
||||||
audio.loop=true;
|
|
||||||
|
|
||||||
function play() {
|
|
||||||
audio.play();
|
|
||||||
}
|
|
||||||
|
|
||||||
audio.loop=true;
|
|
||||||
|
|
||||||
window.addEventListener('load', function() {
|
window.addEventListener('load', function() {
|
||||||
|
const audio = new Audio("{{song}}");
|
||||||
|
audio.loop=true;
|
||||||
|
|
||||||
|
function play() {
|
||||||
|
audio.play();
|
||||||
|
}
|
||||||
|
|
||||||
audio.play();
|
audio.play();
|
||||||
window.addEventListener('click', () => {
|
window.addEventListener('click', () => {
|
||||||
if (audio.paused) audio.play();
|
if (audio.paused) audio.play();
|
||||||
|
|
Loading…
Reference in New Issue