sneed
This commit is contained in:
parent
9b6148e538
commit
4b61a3920b
2 changed files with 14 additions and 15 deletions
|
@ -1297,17 +1297,4 @@ $('.text-expand').click(function(event){
|
|||
$('.text-expand-icon-'+id).toggleClass('fa-expand-alt');
|
||||
$('.text-expand-icon-'+id).toggleClass('fa-compress-alt');
|
||||
|
||||
})
|
||||
|
||||
if (window.location.pathname.includes('/@')) {
|
||||
var userid = document.getElementById("userid").value;
|
||||
if (userid != "nosong")
|
||||
{
|
||||
var audio = new Audio(`/songs/${userid}`);
|
||||
audio.loop=true;
|
||||
audio.play();
|
||||
document.getElementById('userpage').addEventListener('click', () => {
|
||||
if (audio.paused) audio.play();
|
||||
}, {once : true});
|
||||
}
|
||||
}
|
||||
})
|
|
@ -45,7 +45,19 @@
|
|||
|
||||
{% block desktopUserBanner %}
|
||||
<!-- Desktop -->
|
||||
<textarea id="userid" style="display: none;">{% if u.song %}{{u.id}}{% else %}nosong{% endif %}</textarea>
|
||||
<script>
|
||||
var userid = document.getElementById("userid").value;
|
||||
if (userid != "nosong")
|
||||
{
|
||||
var audio = new Audio("/songs/{{u.id}}");
|
||||
audio.loop=true;
|
||||
audio.play();
|
||||
document.getElementById('userpage').addEventListener('click', () => {
|
||||
if (audio.paused) audio.play();
|
||||
}, {once : true});
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="row d-none d-md-block">
|
||||
<div class="col px-0">
|
||||
<div class="jumbotron jumbotron-fluid jumbotron-guild d-none d-md-block" style="background-image: url({{u.banner_url}})">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue