mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-23 00:57:47 +01:00
fix some stuff lol
This commit is contained in:
parent
cff77594a4
commit
8b174cc45b
1 changed files with 6 additions and 81 deletions
|
@ -338,12 +338,7 @@ border:solid;
|
||||||
<div class="progress-bar"></div>
|
<div class="progress-bar"></div>
|
||||||
</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>
|
<nav>
|
||||||
<div class=left>
|
<div class=left>
|
||||||
|
|
||||||
|
@ -366,9 +361,6 @@ border:solid;
|
||||||
<div class=right>
|
<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="/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>
|
<a href="/privacy"><i class="fa-light fa-shield"></i></a>
|
||||||
|
@ -409,7 +401,7 @@ border:solid;
|
||||||
<div class="tabs tabs-center">
|
<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>
|
<a href="" class="tab active ">Music</a>
|
||||||
|
|
||||||
|
@ -429,7 +421,7 @@ border:solid;
|
||||||
<div class="tabs tabs-center">
|
<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=music" class="tab">Music</a>
|
||||||
<% if (!isMobile) { %>
|
<% if (!isMobile) { %>
|
||||||
|
@ -448,7 +440,7 @@ border:solid;
|
||||||
<div class="tabs tabs-center">
|
<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=music" class="tab">Music</a>
|
||||||
<a href="?tab=gaming" class="tab">Gaming</a>
|
<a href="?tab=gaming" class="tab">Gaming</a>
|
||||||
<a href="" class="tab active">Movies</a>
|
<a href="" class="tab active">Movies</a>
|
||||||
|
@ -532,73 +524,6 @@ window.addEventListener("load", () => {
|
||||||
|
|
||||||
</script>
|
</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 >
|
</body >
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue