fix some stuff lol

This commit is contained in:
Ashley 2023-03-19 11:22:56 +00:00
parent cff77594a4
commit 8b174cc45b

View file

@ -337,13 +337,8 @@ border:solid;
<div class="progress-container">
<div class="progress-bar"></div>
</div>
<div style="position: inherit;background: red;margin: -1em;">
<p style="color: black;margin-right: auto;margin-left: auto;width: fit-content;">
A magnitude 7.4 earthquake just hit Türkiye's Kahramanmaras province, please donate to the turkish people via: <a href="https://www.kizilay.org.tr/Bagis/BagisYap/215/afet-acil-durum-bagisi" style="color:black">Here </a> | to see latest news check <a href="https://poketube.fun/search?query=turkey+earthquake+news" style="color:black"> poketube</a> or <a href="https://duckduckgo.com/?q=turkey+earthquake&iar=news&ia=news" style="color:black">duckduckgo</a>
</p>
</div>
<nav>
<div class=left>
@ -365,10 +360,7 @@ border:solid;
<div class=right>
<button title="Play/Pause Ambient music" class="a" id="audioButton" onclick="toggleAudio()">
<i id="audioIcon" class="fas fa-pause"></i>
</button>
<a href="/domains"><i style="display: block;margin-left: auto;margin-right: auto;" class="fa-light fa-server"></i> </a>
<a href="/privacy"><i class="fa-light fa-shield"></i></a>
@ -409,7 +401,7 @@ border:solid;
<div class="tabs tabs-center">
<a href="/" class="tab">Videos</a>
<a href="/discover" class="tab">Videos</a>
<a href="" class="tab active ">Music</a>
@ -429,7 +421,7 @@ border:solid;
<div class="tabs tabs-center">
<a href="/" class="tab">Videos</a>
<a href="/discover" class="tab">Videos</a>
<a href="?tab=music" class="tab">Music</a>
<% if (!isMobile) { %>
@ -448,7 +440,7 @@ border:solid;
<div class="tabs tabs-center">
<a href="/" class="tab">Videos</a>
<a href="/discover" class="tab">Videos</a>
<a href="?tab=music" class="tab">Music</a>
<a href="?tab=gaming" class="tab">Gaming</a>
<a href="" class="tab active">Movies</a>
@ -531,74 +523,7 @@ window.addEventListener("load", () => {
});
</script>
<script>
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0-or-later
const audioElement = document.getElementById("audio");
audioElement.volume = 0.1;
let audioToggled = JSON.parse(localStorage.getItem("audioToggled"));
// When the audio player is loaded, check for stored time value and set current time
audioElement.addEventListener("loadedmetadata", () => {
if (audioToggled) {
const storedTime = localStorage.getItem("audioTime-main");
if (storedTime) {
audioElement.currentTime = storedTime;
}
}
});
// When the user leaves the page, store the current time value
window.addEventListener("beforeunload", () => {
if (audioToggled) {
localStorage.setItem("audioTime-main", audioElement.currentTime);
}
});
const audio = document.getElementById("audio");
const button = document.getElementById("audioButton");
const icon = document.getElementById("audioIcon");
function toggleAudio() {
if (audio.paused) {
audio.play();
audio.volume = 0.1;
button.classList.add("playing");
icon.classList.remove("fa-play");
icon.classList.add("fa-pause");
localStorage.setItem("audioToggled", true); // save that audio is toggled
} else {
audio.pause();
button.classList.remove("playing");
icon.classList.remove("fa-pause");
icon.classList.add("fa-play");
localStorage.setItem("audioToggled", false); // save that audio is not toggled
}
}
if (audioToggled === null || audioToggled === undefined) {
audioToggled = true;
}
if (audioToggled == false) {
audio.pause();
button.classList.remove("playing");
icon.classList.remove("fa-pause");
icon.classList.add("fa-play");
} else {
audio.play();
audio.volume = 0.1;
audio.src = "https://inv.zzls.xyz/latest_version?id=k3UevKvP9RU&itag=18"
button.classList.add("playing");
icon.classList.remove("fa-play");
icon.classList.add("fa-pause");
}
// Show the audio button
button.style.display = "block";
</script>
</body >
</html>