Skip to content

Commit

Permalink
add easteregg sf
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlecart committed Nov 21, 2023
1 parent 69618ec commit f968df0
Show file tree
Hide file tree
Showing 6 changed files with 296 additions and 128 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ <h3>⚠️ Spécifité Amiénoise</h3>
<td>Sage-Femme</td>
<td>Ânkh</td>
<td data-fal-insigne>
<img loading="lazy" width="100" height="100" src="/images/insigne/croix_dankh.png"
<img id="ea-sf" loading="lazy" width="100" height="100" src="/images/insigne/croix_dankh.png"
alt="Ânkh" />
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion js/checklistcongres.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ helpicons.forEach(function (helpicon) {
});

document.getElementById('clear-checkboxes').addEventListener('click', function () {
const excludedKeys = ['darkmode'];
const excludedKeys = ['darkmode', 'debug'];
const keys = Object.keys(localStorage);

keys.forEach(key => {
Expand Down
16 changes: 14 additions & 2 deletions js/easteregg.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
console.log("Eastereggs loading");
const image = document.getElementById("palmeSciences");
const imageSciences = document.getElementById("palmeSciences");
const imageSf = document.getElementById("ea-sf");

let clicsSciences = 0;
let clicsSf = 0;

image.addEventListener("click", async () => {
imageSciences.addEventListener("click", async () => {
clicsSciences++;

if (clicsSciences === 5) {
Expand All @@ -12,3 +14,13 @@ image.addEventListener("click", async () => {
clicsSciences = 0;
}
});

imageSf.addEventListener("click", async () => {
clicsSf++;

if (clicsSf === 5) {
const audio = new Audio("/sound/sf_pleurs_bebe_02.mp3");
await audio.play();
clicsSf = 0;
}
});
Loading

0 comments on commit f968df0

Please sign in to comment.