Relaxed spam timeout.
This commit is contained in:
parent
0feb4de84c
commit
d951105497
1 changed files with 7 additions and 4 deletions
11
index.html
11
index.html
|
@ -215,8 +215,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
let lastFumbleTime = 0;
|
let lastFumbleTime = 0;
|
||||||
const cooldownPeriod = 2000; // Reduce to 2 seconds cooldown
|
const cooldownPeriod = 5000; // Increase to 5 seconds cooldown
|
||||||
const warningThreshold = 3; // Number of quick fumbles before warning
|
const warningThreshold = 5; // Increase threshold to 5 quick fumbles before warning
|
||||||
let quickFumbleCount = 0;
|
let quickFumbleCount = 0;
|
||||||
let cooldownTimer = null;
|
let cooldownTimer = null;
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@
|
||||||
closeBtn.disabled = true;
|
closeBtn.disabled = true;
|
||||||
|
|
||||||
// Update countdown timer
|
// Update countdown timer
|
||||||
let remainingTime = 3; // Reduce to 3 second countdown for closing
|
let remainingTime = 5; // Keep 5 second countdown for closing
|
||||||
cooldownSeconds.textContent = remainingTime;
|
cooldownSeconds.textContent = remainingTime;
|
||||||
|
|
||||||
if (cooldownTimer) clearInterval(cooldownTimer);
|
if (cooldownTimer) clearInterval(cooldownTimer);
|
||||||
|
@ -254,7 +254,10 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
quickFumbleCount = 0; // Reset counter if enough time has passed
|
// Only reset counter if significant time has passed (10 seconds)
|
||||||
|
if (timeSinceLastFumble > 10000) {
|
||||||
|
quickFumbleCount = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lastFumbleTime = currentTime;
|
lastFumbleTime = currentTime;
|
||||||
|
|
Loading…
Reference in a new issue