пусть баланс почти сразу становится рости , начало долгое
Browse files- index.html +41 -16
index.html
CHANGED
|
@@ -421,24 +421,49 @@ document.getElementById('balanceChange').textContent = `+${change}`;
|
|
| 421 |
|
| 422 |
return balance;
|
| 423 |
}
|
| 424 |
-
|
| 425 |
-
// Initialize balance display
|
| 426 |
document.getElementById('balanceCounter').textContent = balance.toString();
|
| 427 |
-
document.getElementById('balanceChange').textContent = '+0';
|
| 428 |
-
|
| 429 |
-
// Update balance every 3-5 seconds
|
| 430 |
-
function scheduleBalanceUpdate() {
|
| 431 |
-
const delay = Math.floor(Math.random() * 2000) + 3000;
|
| 432 |
-
setTimeout(() => {
|
| 433 |
-
updateBalance();
|
| 434 |
-
scheduleBalanceUpdate();
|
| 435 |
-
}, delay);
|
| 436 |
-
}
|
| 437 |
|
| 438 |
-
// Start
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 442 |
// Periodically increase user count
|
| 443 |
setInterval(() => {
|
| 444 |
const current = parseInt(document.getElementById('userCounter').textContent.replace(/,/g, ''));
|
|
|
|
| 421 |
|
| 422 |
return balance;
|
| 423 |
}
|
| 424 |
+
// Initialize balance display with fast growth
|
|
|
|
| 425 |
document.getElementById('balanceCounter').textContent = balance.toString();
|
| 426 |
+
document.getElementById('balanceChange').textContent = '+0';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 427 |
|
| 428 |
+
// Start immediate fast growth sequence
|
| 429 |
+
let growthInterval = setInterval(() => {
|
| 430 |
+
const change = Math.floor(Math.random() * 500) + 100; // Larger increments
|
| 431 |
+
previousBalance = balance;
|
| 432 |
+
balance += change;
|
| 433 |
+
|
| 434 |
+
document.getElementById('balanceCounter').textContent = balance.toString();
|
| 435 |
+
document.getElementById('balanceChange').textContent = `+${change}`;
|
| 436 |
+
|
| 437 |
+
// Flash green on update
|
| 438 |
+
const counter = document.getElementById('balanceCounter');
|
| 439 |
+
counter.classList.add('animate-pulse');
|
| 440 |
+
setTimeout(() => counter.classList.remove('animate-pulse'), 1000);
|
| 441 |
+
|
| 442 |
+
// Switch to slower updates after reaching 5000
|
| 443 |
+
if (balance > 5000) {
|
| 444 |
+
clearInterval(growthInterval);
|
| 445 |
+
|
| 446 |
+
// Continue with slower updates
|
| 447 |
+
function scheduleBalanceUpdate() {
|
| 448 |
+
const change = Math.floor(Math.random() * 200) + 50;
|
| 449 |
+
previousBalance = balance;
|
| 450 |
+
balance += change;
|
| 451 |
+
|
| 452 |
+
document.getElementById('balanceChange').textContent = `+${change}`;
|
| 453 |
+
animateCounter('balanceCounter', balance, 1000);
|
| 454 |
+
|
| 455 |
+
const counter = document.getElementById('balanceCounter');
|
| 456 |
+
counter.classList.add('animate-pulse');
|
| 457 |
+
setTimeout(() => counter.classList.remove('animate-pulse'), 1000);
|
| 458 |
+
|
| 459 |
+
const delay = Math.floor(Math.random() * 2000) + 3000;
|
| 460 |
+
setTimeout(scheduleBalanceUpdate, delay);
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
+
// Start slower updates
|
| 464 |
+
setTimeout(scheduleBalanceUpdate, 3000);
|
| 465 |
+
}
|
| 466 |
+
}, 800); // Fast updates every 800ms initially
|
| 467 |
// Periodically increase user count
|
| 468 |
setInterval(() => {
|
| 469 |
const current = parseInt(document.getElementById('userCounter').textContent.replace(/,/g, ''));
|