fds
This commit is contained in:
parent
bdcd2bd0e7
commit
5afa772579
4 changed files with 14 additions and 12 deletions
|
@ -22,11 +22,4 @@ if (uid)
|
|||
document.getElementById("pause2").classList.toggle("d-none");
|
||||
document.getElementById("play2").classList.toggle("d-none");
|
||||
}
|
||||
|
||||
window.addEventListener('load', (e) => {
|
||||
audio.play();
|
||||
document.getElementById('userpage').addEventListener('click', () => {
|
||||
if (audio.paused) audio.play();
|
||||
}, {once : true});
|
||||
});
|
||||
}
|
|
@ -198,8 +198,17 @@
|
|||
{% endif %}
|
||||
|
||||
{% if u.song and v and v.mute and (not u.unmutable or v.id == u.id) %}
|
||||
<a id="pause1" class="btn btn-secondary" role="button" onclick="pause()">Pause anthem</a>
|
||||
<a id="play1" class="btn btn-secondary d-none" role="button" onclick="play()">Play anthem</a>
|
||||
<a id="play1" class="btn btn-secondary" role="button" onclick="play()">Play anthem</a>
|
||||
<a id="pause1" class="btn btn-secondary d-none" role="button" onclick="pause()">Pause anthem</a>
|
||||
{% else %}
|
||||
<script>
|
||||
window.addEventListener('load', (e) => {
|
||||
audio.play();
|
||||
document.getElementById('userpage').addEventListener('click', () => {
|
||||
if (audio.paused) audio.play();
|
||||
}, {once : true});
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if v and v.id != u.id and v.admin_level > 1 %}
|
||||
|
@ -676,7 +685,7 @@
|
|||
<div id="username" class="d-none">{{u.username}}</div>
|
||||
{% endif %}
|
||||
|
||||
<script src="/static/assets/js/userpage.js?a=3"></script>
|
||||
<script src="/static/assets/js/userpage.js?a=4"></script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -114,5 +114,5 @@
|
|||
<div id="username" class="d-none">{{u.username}}</div>
|
||||
{% endif %}
|
||||
|
||||
<script src="/static/assets/js/userpage.js?a=3"></script>
|
||||
<script src="/static/assets/js/userpage.js?a=4"></script>
|
||||
{% endblock %}
|
|
@ -48,5 +48,5 @@
|
|||
<div id="username" class="d-none">{{u.username}}</div>
|
||||
{% endif %}
|
||||
|
||||
<script src="/static/assets/js/userpage.js?a=3"></script>
|
||||
<script src="/static/assets/js/userpage.js?a=4"></script>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue