mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 16:37:52 +01:00
ehe
This commit is contained in:
parent
12604c4a46
commit
7019791f44
1 changed files with 30 additions and 18 deletions
48
css/app.js
48
css/app.js
|
@ -110,6 +110,13 @@ function jumpToTime(e) {
|
||||||
const link = e.target;
|
const link = e.target;
|
||||||
const video = document.getElementById('video');
|
const video = document.getElementById('video');
|
||||||
const time = link.dataset.jumpTime;
|
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;
|
video.currentTime = time;
|
||||||
|
|
||||||
|
@ -344,29 +351,34 @@ video.addEventListener("contextmenu", function(event) {
|
||||||
|
|
||||||
loopedIndicator.style.display = "none"; // Initially hide the indicator
|
loopedIndicator.style.display = "none"; // Initially hide the indicator
|
||||||
|
|
||||||
loopOption.addEventListener("click", function() {
|
loopOption.addEventListener("click", function() {
|
||||||
var looped = video.loop;
|
const quaindt = new URLSearchParams(window.location.search).get("quality") || "";
|
||||||
video.loop = !looped;
|
|
||||||
|
|
||||||
|
var looped = video.loop;
|
||||||
|
video.loop = !looped;
|
||||||
|
|
||||||
// Update the looped indicator popup
|
if (quaindt !== "medium") {
|
||||||
var displaySpecialText = Math.random() < 0.5;
|
var loopedaudioelement = document.getElementById("aud");
|
||||||
|
if (loopedaudioelement) {
|
||||||
|
audio.loop = !looped;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Update the looped indicator popup
|
var displaySpecialText = Math.random() < 0.5;
|
||||||
if (displaySpecialText) {
|
|
||||||
var specialText = looped ? "Unlooped >.<" : "Looped~ :3 >~<";
|
|
||||||
loopedIndicator.textContent = specialText;
|
|
||||||
} else {
|
|
||||||
loopedIndicator.textContent = looped ? "Unlooped!" : "Looped!";
|
|
||||||
}
|
|
||||||
loopedIndicator.style.display = "block";
|
|
||||||
|
|
||||||
// Hide the indicator after 2 seconds
|
if (displaySpecialText) {
|
||||||
setTimeout(function() {
|
var specialText = looped ? "Unlooped >.<" : "Looped~ :3 >~<";
|
||||||
loopedIndicator.style.display = "none";
|
loopedIndicator.textContent = specialText;
|
||||||
}, 2000);
|
} else {
|
||||||
|
loopedIndicator.textContent = looped ? "Unlooped!" : "Looped!";
|
||||||
|
}
|
||||||
|
loopedIndicator.style.display = "block";
|
||||||
|
|
||||||
});
|
// Hide the indicator after 2 seconds
|
||||||
|
setTimeout(function() {
|
||||||
|
loopedIndicator.style.display = "none";
|
||||||
|
}, 2000);
|
||||||
|
});
|
||||||
|
|
||||||
speedOption.addEventListener("click", function() {
|
speedOption.addEventListener("click", function() {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue