greekbuilding names ,live synch button ,market capacity

This commit is contained in:
2026-04-22 20:48:34 +03:00
parent ec2b0c631e
commit c1cc8ceb7a
7 changed files with 92 additions and 5 deletions

View File

@@ -223,3 +223,28 @@ window.dismissCaptchaBanner = function() {
banner.dataset.dismissed = '1';
}
};
window.requestLiveSync = async function() {
const btn = document.getElementById('live-btn');
const originalText = btn.textContent;
btn.textContent = '⏳ Requesting...';
btn.disabled = true;
try {
const res = await fetch('/api/sync-request?player_id=' + window.PLAYER_ID, { method: 'POST' });
const data = await res.json();
if (data.ok) {
btn.textContent = '✅ Requested!';
setTimeout(() => {
btn.textContent = originalText;
btn.disabled = false;
}, 5000);
}
} catch (e) {
btn.textContent = '❌ Failed';
setTimeout(() => {
btn.textContent = originalText;
btn.disabled = false;
}, 3000);
}
};