mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 00:58:58 +01:00
ehe
This commit is contained in:
parent
12604c4a46
commit
7019791f44
1 changed files with 30 additions and 18 deletions
22
css/app.js
22
css/app.js
|
@ -111,6 +111,13 @@ function jumpToTime(e) {
|
|||
const video = document.getElementById('video');
|
||||
const time = link.dataset.jumpTime;
|
||||
|
||||
const qualityforaudiostuff = new URLSearchParams(window.location.search).get("quality") || "";
|
||||
|
||||
if (qualityforaudiostuff !== "medium") {
|
||||
var audiojumptotime = document.getElementById('aud');
|
||||
audiojumptotime.currentTime = time;
|
||||
}
|
||||
|
||||
video.currentTime = time;
|
||||
|
||||
window.location.hash = 'top'; // Add #video to the URL
|
||||
|
@ -344,15 +351,21 @@ video.addEventListener("contextmenu", function(event) {
|
|||
|
||||
loopedIndicator.style.display = "none"; // Initially hide the indicator
|
||||
|
||||
loopOption.addEventListener("click", function() {
|
||||
loopOption.addEventListener("click", function() {
|
||||
const quaindt = new URLSearchParams(window.location.search).get("quality") || "";
|
||||
|
||||
var looped = video.loop;
|
||||
video.loop = !looped;
|
||||
|
||||
if (quaindt !== "medium") {
|
||||
var loopedaudioelement = document.getElementById("aud");
|
||||
if (loopedaudioelement) {
|
||||
audio.loop = !looped;
|
||||
}
|
||||
}
|
||||
|
||||
// Update the looped indicator popup
|
||||
var displaySpecialText = Math.random() < 0.5;
|
||||
|
||||
// Update the looped indicator popup
|
||||
if (displaySpecialText) {
|
||||
var specialText = looped ? "Unlooped >.<" : "Looped~ :3 >~<";
|
||||
loopedIndicator.textContent = specialText;
|
||||
|
@ -365,8 +378,7 @@ video.addEventListener("contextmenu", function(event) {
|
|||
setTimeout(function() {
|
||||
loopedIndicator.style.display = "none";
|
||||
}, 2000);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
speedOption.addEventListener("click", function() {
|
||||
|
||||
|
|
Loading…
Reference in a new issue