1
Fork 0
mirror of https://github.com/RGBCube/GDUS synced 2025-07-29 05:57:45 +00:00

Alert even on load

This commit is contained in:
RGBCube 2023-12-15 15:59:33 +03:00
parent 75df22e23d
commit 38d94c3b81
No known key found for this signature in database

View file

@ -90,9 +90,7 @@ async fn view(data: Data<SqlitePool>) -> web::Result<Markup> {
}
script defer {(PreEscaped(r##"
setInterval(() => {
location.reload();
const alertIfTime = () => {
const reminders = Array.from(
document
.querySelectorAll("#reminders .timestamp")
@ -115,6 +113,13 @@ async fn view(data: Data<SqlitePool>) -> web::Result<Markup> {
alert("Geldi! " + reminder.content);
}
});
};
alertIfTime();
setInterval(() => {
location.reload();
alertIfTime();
}, 1 * 60 * 1000);
"##))}
})