From 3476daa046ca287a3868536778e1a53382edcafb Mon Sep 17 00:00:00 2001
From: Jonas Kohl
Date: Thu, 25 Jul 2024 14:55:32 +0200
Subject: Add loading indicator
---
src/pages/guestbook.php | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
(limited to 'src/pages')
diff --git a/src/pages/guestbook.php b/src/pages/guestbook.php
index d04c3ec..e7c3e28 100644
--- a/src/pages/guestbook.php
+++ b/src/pages/guestbook.php
@@ -3,9 +3,9 @@
Guestbook
-
+
Emoticon guide
-
+
@@ -42,6 +42,9 @@ $(function() {
.attr("id", "gbframe")
.attr("frameborder", "0")
.attr("src", "//guestbook.hozyro.jkohl.link/?__e=1&__p[ok_target]=_top&__p[ok_url]=" + encodeURIComponent(location.href))
+ .on("load", function() {
+ $("#guestbook_frame").removeClass("is-loading");
+ })
);
$("#emoticon-guide").click(function(e) {
e.preventDefault();
@@ -99,6 +102,8 @@ function _gbcb(data) {
.html(replace_emoticons(nl2br(htmlentities(entry.content))))
).appendTo("#guestbook")
})
+
+ $("#guestbook").removeClass("h32 is-loading");
}
--
cgit v1.2.3