custom blinds
All checks were successful
Publish Package / build (push) Successful in 1m43s

Signed-off-by: Weetile <weetile@noreply.localhost>
This commit is contained in:
Weetile 2025-03-13 20:49:34 +00:00
parent 3f4848bcbe
commit 10165ca541

View File

@ -377,8 +377,8 @@
<div class="timer-section">
<h2 class="section-title">BLINDS TIMER</h2>
<div class="blind-levels">
<div class="current-level" id="current-blinds">10 / 20</div>
<div class="next-level">Next: <span id="next-blinds">20 / 40</span></div>
<div class="current-level" id="current-blinds">5 / 10</div>
<div class="next-level">Next: <span id="next-blinds">10 / 20</span></div>
</div>
<div class="timer-display" id="timer">30:00</div>
<div class="timer-controls">
@ -414,16 +414,35 @@
let isTimerRunning = false;
// Blind levels
let currentBlinds = { small: 10, big: 20 };
let currentBlinds = { small: 5, big: 10 };
let blindLevels = [];
// Generate blind levels
// Generate blind levels with the specified structure
function generateBlindLevels() {
blindLevels = [];
let small = 10;
let big = 20;
// Initial specific blind levels as requested
blindLevels = [
{ small: 5, big: 10 },
{ small: 10, big: 20 },
{ small: 20, big: 40 },
{ small: 30, big: 60 },
{ small: 40, big: 80 },
{ small: 50, big: 100 },
{ small: 75, big: 150 },
{ small: 100, big: 200 },
{ small: 150, big: 300 },
{ small: 200, big: 400 },
{ small: 300, big: 600 },
{ small: 400, big: 800 },
{ small: 500, big: 1000 }
];
for (let i = 0; i < 20; i++) {
// Continue doubling from the last level
let lastLevel = blindLevels[blindLevels.length - 1];
let small = lastLevel.small * 2;
let big = lastLevel.big * 2;
// Add 7 more doubled levels
for (let i = 0; i < 7; i++) {
blindLevels.push({ small, big });
small *= 2;
big *= 2;
@ -475,9 +494,11 @@
timeRemaining--;
updateTimerDisplay();
} else {
// Time's up, move to next blind level
// Time's up, move to next blind level and restart the timer
incrementBlinds();
resetTimer();
timeRemaining = timerDuration; // Reset time remaining to duration
updateTimerDisplay(); // Update display with new time
// Timer continues running without stopping
}
}, 1000);
@ -623,4 +644,4 @@
window.addEventListener('DOMContentLoaded', init);
</script>
</body>
</html>
</html>