mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-29 10:36:32 +00:00
20 lines
435 B
JavaScript
20 lines
435 B
JavaScript
function displayAlert(message, clear = 4000) {
|
|
const alert = document.getElementById('alert')
|
|
const alertText = document.getElementById('alertText')
|
|
|
|
alert.classList.add('show')
|
|
|
|
alertText.innerText = message
|
|
|
|
setTimeout(() => {
|
|
hideAlert()
|
|
}, clear)
|
|
}
|
|
|
|
function hideAlert() {
|
|
const alert = document.getElementById('alert')
|
|
const alertText = document.getElementById('alertText')
|
|
|
|
alert.classList.remove('show')
|
|
}
|