Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,22 @@ body {
bottom: 10%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 3em;
font-weight: bold;
color: white;
text-align: center;
z-index: 20;
user-select: none;
pointer-events: none;
animation: pulse 1.2s infinite alternate;
transition: opacity 0.6s ease;
user-select: none;

button {
border: none;
background-color: inherit;
cursor: pointer;
display: inline-block;
color: white;
font-size: 3em;
font-weight: bold;
text-align: center;
padding: 0.2em;
}
}

/* Animation de pulsation */
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<body>

<div id="startMessage">START</div>
<div id="startMessage"><button onclick="startAnimation()">START</button></div>
<div id="timer">00:00</div>
<div id="expandingDiv"></div>
<div id="credits">made with ❤️ by Zenika</div>
Expand Down
9 changes: 1 addition & 8 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async function requestWakeLock() {

function playBeep() {
if (!soundEnabled) return;

const AudioContext = window.AudioContext || window.webkitAudioContext;
const audioCtx = new AudioContext();

Expand All @@ -126,13 +126,6 @@ function playBeep() {
oscillator.stop(audioCtx.currentTime + 0.3); // play for 0.3s
}

// --- Démarrage au clic ---
function onFirstClick() {
startAnimation();
document.removeEventListener('click', onFirstClick);
}
document.addEventListener('click', onFirstClick);

// Wakelock: réactiver si la page revient au premier plan
document.addEventListener('visibilitychange', () => {
if (wakeLock !== null && document.visibilityState === 'visible') {
Expand Down