mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 09:18:13 +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
11
css/app.js
11
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
|
||||||
|
var displaySpecialText = Math.random() < 0.5;
|
||||||
|
|
||||||
|
// Update the looped indicator popup
|
||||||
|
if (displaySpecialText) {
|
||||||
|
var specialText = looped ? "Unlooped >.<" : "Looped~ :3 >~<";
|
||||||
|
loopedIndicator.textContent = specialText;
|
||||||
|
} else {
|
||||||
loopedIndicator.textContent = looped ? "Unlooped!" : "Looped!";
|
loopedIndicator.textContent = looped ? "Unlooped!" : "Looped!";
|
||||||
|
}
|
||||||
loopedIndicator.style.display = "block";
|
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