mirror of
https://github.com/Myxelium/RandomMemerBot.git
synced 2026-04-09 08:59:39 +00:00
18 lines
452 B
JavaScript
18 lines
452 B
JavaScript
document.getElementById('joinButton').addEventListener('click', function() {
|
|
this.disabled = true;
|
|
|
|
fetch('/join')
|
|
.then(response => response.text())
|
|
.then(data => {
|
|
console.log(data);
|
|
setTimeout(() => {
|
|
this.disabled = false;
|
|
}, 40000);
|
|
})
|
|
.catch((error) => {
|
|
console.error('Error:', error);
|
|
setTimeout(() => {
|
|
this.disabled = false;
|
|
}, 1000);
|
|
});
|
|
}); |