diff options
| author | ilotterytea <iltsu@alright.party> | 2025-04-20 18:11:49 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-04-20 18:11:49 +0500 |
| commit | 1f4877e3a8d59a4a4fb20d175b69d5e8f3349e5c (patch) | |
| tree | 11f030b9361ac064d0880329d753d5be066c9166 /src | |
| parent | e251ac263125403009388fd50edaf855c645a9b2 (diff) | |
upd: remove alert after 5 seconds
Diffstat (limited to 'src')
| -rw-r--r-- | src/alert.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/alert.php b/src/alert.php index eb67f77..62f1887 100644 --- a/src/alert.php +++ b/src/alert.php @@ -25,9 +25,15 @@ function display_alert() $ok = substr($status, 0, 1) == '2'; echo '' ?> - <div class="box row alert <?php echo $ok ? '' : 'red' ?>" style="gap:8px;"> + <div class="box row alert <?php echo $ok ? '' : 'red' ?>" style="gap:8px;" id="alert-box"> <img src="/static/img/icons/<?php echo $ok ? 'yes' : 'no' ?>.png" alt=""> <p><b><?php echo $reason ?></b></p> </div> + <script> + setTimeout(() => { + const alertBox = document.getElementById("alert-box"); + alertBox.remove(); + }, 5000); + </script> <?php }
\ No newline at end of file |
