add processing server check
This commit is contained in:
@ -46,25 +46,31 @@
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3415518411898563" crossorigin="anonymous"></script>
|
||||
<script>
|
||||
let audioObject;
|
||||
document.addEventListener("DOMContentLoaded", ()=>{
|
||||
let music = {{ is_music }};
|
||||
let audioObject;
|
||||
if(music) {
|
||||
let url = "{{ song_url }}";
|
||||
audioObject = new Audio(url);
|
||||
audioObject.addEventListener("loadeddata", () => {
|
||||
document.getElementById("totalLength").innerText = `${Math.floor(audioObject.duration/60)}:${String(Math.floor(audioObject.duration%60)).padStart(2, "0")}`;
|
||||
document.getElementById("playbar").value = 0;
|
||||
})
|
||||
document.getElementById("enter").addEventListener("click", async ()=>{
|
||||
document.getElementById("enter").style.backgroundColor = "#00000000"
|
||||
document.getElementById("enter").style.backdropFilter = "blur(0px)"
|
||||
document.getElementById("enter").style.opacity = "0";
|
||||
setTimeout( () => {
|
||||
document.getElementById("enter").style.display = "none";
|
||||
setTimeout(() => {
|
||||
audioObject.play();
|
||||
audioObject.loop = true;
|
||||
}, 700);
|
||||
}, 500)
|
||||
setTimeout( () => {
|
||||
document.getElementById("enter").style.display = "none";
|
||||
}, 950);
|
||||
});
|
||||
} else {
|
||||
document.getElementById("enter").style.display = "none";
|
||||
document.querySelectorAll("section")[0].querySelectorAll(".profile-element")[1].style.display = "none";
|
||||
}
|
||||
document.getElementById("playPause").addEventListener("click", ()=>{
|
||||
if(audioObject.paused) {
|
||||
|
Reference in New Issue
Block a user