play sound

pull/226/head
Aevann 2024-05-17 00:12:28 +03:00
parent 0360b23805
commit 0ee3b9d6cd
4 changed files with 13 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,8 @@
let audio = new Audio(`/i/6.webp`);
audio.play();
if (audio.paused) {
document.addEventListener('click', () => {
if (audio.paused) audio.play();
}, {once : true})
}

View File

@ -33,6 +33,10 @@
{% endwith %}
{% endif %}
</div>
{% if v and v.is_underage %}
<script defer src="{{'js/underage.js' | asset}}"></script>
{% endif %}
{% endblock %}
{% block pagenav %}

View File

@ -15,6 +15,7 @@
{%- endif %}
{% if title == 'THIS IS AN 18+ WEBSITE' %}
<div><a href="/contact" class="btn btn-primary mt-1">Contact Admins</a></div>
<script defer src="{{'js/underage.js' | asset}}"></script>
{% else %}
<div><a href="/" class="btn btn-primary mt-3">Go to frontpage</a></div>
{% endif %}