cbv
This commit is contained in:
parent
03f080d781
commit
18087a101c
6 changed files with 18 additions and 5 deletions
BIN
files/assets/crab.mp3
Normal file
BIN
files/assets/crab.mp3
Normal file
Binary file not shown.
|
@ -45,7 +45,7 @@ else
|
||||||
if (!paused)
|
if (!paused)
|
||||||
{
|
{
|
||||||
audio.play();
|
audio.play();
|
||||||
document.getElementById('userpage').addEventListener('click', () => {
|
window.addEventListener('click', () => {
|
||||||
if (audio.paused) audio.play();
|
if (audio.paused) audio.play();
|
||||||
}, {once : true});
|
}, {once : true});
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,20 @@
|
||||||
|
|
||||||
|
|
||||||
{% if p.award_count("crab") %}
|
{% if p.award_count("crab") %}
|
||||||
<iframe width="0" height="0" src="https://youtube.com/embed/LDU_Txk06tM?rel=0&controls=0&showinfo=0&autoplay=1&start=44" frameborder="0" allow="autoplay"></iframe>
|
<script>
|
||||||
|
let audio = new Audio('/assets/crab.mp3');
|
||||||
|
audio.loop=true;
|
||||||
|
|
||||||
|
function toggle() {
|
||||||
|
if (audio.paused) audio.play()
|
||||||
|
else audio.pause()
|
||||||
|
}
|
||||||
|
|
||||||
|
audio.play();
|
||||||
|
window.addEventListener('click', () => {
|
||||||
|
if (audio.paused) audio.play();
|
||||||
|
}, {once : true});
|
||||||
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if g.inferior_browser %}
|
{% if g.inferior_browser %}
|
||||||
|
|
|
@ -730,7 +730,7 @@
|
||||||
<div id="username" class="d-none">{{u.username}}</div>
|
<div id="username" class="d-none">{{u.username}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="/static/assets/js/userpage.js?a=240"></script>
|
<script src="/static/assets/js/userpage.js?a=241"></script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -118,5 +118,5 @@
|
||||||
<div id="username" class="d-none">{{u.username}}</div>
|
<div id="username" class="d-none">{{u.username}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="/static/assets/js/userpage.js?a=240"></script>
|
<script src="/static/assets/js/userpage.js?a=241"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -52,5 +52,5 @@
|
||||||
<div id="username" class="d-none">{{u.username}}</div>
|
<div id="username" class="d-none">{{u.username}}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="/static/assets/js/userpage.js?a=240"></script>
|
<script src="/static/assets/js/userpage.js?a=241"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue