mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 17:17:49 +01:00
add looped easter egg :3
This commit is contained in:
parent
75a08f6754
commit
c92384e95a
1 changed files with 12 additions and 3 deletions
15
css/app.js
15
css/app.js
|
@ -307,14 +307,23 @@ function fetchUrls(urls) {
|
||||||
var looped = video.loop;
|
var looped = video.loop;
|
||||||
video.loop = !looped;
|
video.loop = !looped;
|
||||||
|
|
||||||
|
|
||||||
// Update the looped indicator popup
|
// Update the looped indicator popup
|
||||||
loopedIndicator.textContent = looped ? "Unlooped!" : "Looped!";
|
var displaySpecialText = Math.random() < 0.5;
|
||||||
loopedIndicator.style.display = "block";
|
|
||||||
|
// Update the looped indicator popup
|
||||||
|
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
|
// Hide the indicator after 2 seconds
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
loopedIndicator.style.display = "none";
|
loopedIndicator.style.display = "none";
|
||||||
}, 2000);
|
}, 1000);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue